Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
caf42a6
Added support for who ICD10 codes.
caherzee Oct 17, 2025
439772d
Split into two mains:
caherzee Oct 17, 2025
2858a81
Updated readme
caherzee Oct 17, 2025
2addcaf
Remove TriNetX specific filters from generic main
caherzee Oct 20, 2025
fc50908
Refactoring to seperate CLI APIs from general ICD10 parsing code. Split
caherzee Oct 21, 2025
9df648b
Make event of interest a CLI option
caherzee Oct 21, 2025
3642ed2
Added patient filters for age <65 and age >65
caherzee Oct 21, 2025
93c699d
Changed inteface for patient filters.
caherzee Oct 22, 2025
4f84f13
Added generic trajectory filters.
caherzee Oct 24, 2025
a45fd01
Support for ACT codes
caherzee Oct 29, 2025
1cbe1f8
Simplified data interface: removed unused TrinetX fields from
caherzee Oct 29, 2025
39d9245
Updated control output.
caherzee Nov 3, 2025
09e7b4c
adding DOT graph generation
vanmeerb Nov 4, 2025
7dd2749
adding cluster-nr to nodes in dot
vanmeerb Nov 4, 2025
1765dfe
going multiline for node labels in dot
vanmeerb Nov 4, 2025
796e618
going multiline for node labels in dot
vanmeerb Nov 4, 2025
d663917
nicer colors, no more magenta
vanmeerb Nov 4, 2025
d4e3da2
Merge pull request #8 from ExaScience/feat/dot
caherzee Nov 4, 2025
85421be
re-do of structured log printing on stdout
vanmeerb Nov 7, 2025
0de99f2
updated
vanmeerb Nov 7, 2025
b86c287
adding compile workflow
vanmeerb Nov 7, 2025
22d5e0d
adding compile workflow
vanmeerb Nov 7, 2025
0ac034a
adding more slog calls
vanmeerb Nov 10, 2025
400bf87
adding more slog calls
vanmeerb Nov 10, 2025
3d46838
slog updates after initial test
vanmeerb Nov 11, 2025
144cf8f
slog in clustering
vanmeerb Nov 12, 2025
5281a76
adding go test
vanmeerb Nov 12, 2025
0c32e66
Updated readme
caherzee Nov 17, 2025
c8d3a60
Updated readme with documentation for --loglvl option.
caherzee Nov 17, 2025
99d99b9
Structured logging. Merge pull request #9 from ExaScience/feat/slogs
caherzee Nov 17, 2025
a9b4b2c
Switched to structured output + updated readme
caherzee Nov 19, 2025
902758c
Fix readme
caherzee Nov 19, 2025
8b2126c
Added dot output for cluster annotated with patient numbers
caherzee Dec 17, 2025
d69238f
Added code for calculating the extended modularity score of the
caherzee Dec 24, 2025
f8c3157
Integrated code for calculating extended modularity score with main.
caherzee Jan 5, 2026
3ecea59
Refactor: rename to empirical probability
caherzee Jan 6, 2026
5a33111
Updated readme with extended modularity metric for comparing
caherzee Jan 6, 2026
9844dc6
Fix readme
caherzee Jan 28, 2026
ca1b0b2
Add test data (fake).
caherzee Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/compile_go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
pull_request:

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Build
run: go build -v -o ptra cmd/main.go

- name: Test
run: cd ptra_test && go test

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PTRA: Patient Trajectory Analysis Library.
Copyright (c) 2022 imec vzw.
Copyright (c) 2022-2026 imec vzw.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
Expand Down
291 changes: 257 additions & 34 deletions README.md

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions app/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,36 @@ func BladderCancerTrajectoryFilter(exp *trajectory.Experiment) trajectory.Trajec
return false
}
}

func codeMember(code string, categories []string) bool {
for _, cat := range categories {
if code == cat {
return true
}
}
return false
}

func Icd10TrajectoryFilter(exp *trajectory.Experiment, codes []string) trajectory.TrajectoryFilter {
//Determine all diagnoses that match the given codes, either exactly or either the top-level category
codeRelatedMap := map[int]bool{}
for did, _ := range exp.NameMap {
icdCode := exp.IdMap[did]
if len(icdCode) >= 3 {
subCode := icdCode[0:3]
if codeMember(subCode, codes) {
codeRelatedMap[did] = true
} else {
codeRelatedMap[did] = false
}
}
}
return func(t *trajectory.Trajectory) bool {
for _, did := range t.Diagnoses {
if codeRelatedMap[did] {
return true
}
}
return false
}
}
Loading
Loading