Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 128-tumorkonferenz mapping #251

Open
wants to merge 7 commits into
base: beta
Choose a base branch
from

Conversation

cfischer27
Copy link
Collaborator

@cfischer27 cfischer27 commented Feb 25, 2025

Closes #128

Copy link

github-actions bot commented Feb 25, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 5 0 0.08s
✅ BASH bash-exec 4 0 0.03s
✅ BASH shellcheck 4 0 0.03s
✅ BASH shfmt 4 0 0.02s
✅ DOCKERFILE hadolint 1 0 0.11s
✅ EDITORCONFIG editorconfig-checker 269 0 1.85s
✅ GROOVY npm-groovy-lint 2 0 11.6s
✅ JAVA checkstyle 86 0 8.92s
✅ JSON jsonlint 95 0 0.2s
✅ JSON npm-package-json-lint yes no 0.7s
✅ JSON prettier 95 0 0.76s
✅ JSON v8r 95 0 87.31s
✅ MARKDOWN markdownlint 8 0 0.66s
✅ REPOSITORY checkov yes no 15.67s
✅ REPOSITORY gitleaks yes no 0.71s
✅ REPOSITORY git_diff yes no 0.04s
✅ REPOSITORY grype yes no 15.81s
✅ REPOSITORY kics yes no 14.94s
✅ REPOSITORY secretlint yes no 1.26s
✅ REPOSITORY syft yes no 3.34s
✅ REPOSITORY trivy yes no 9.21s
✅ REPOSITORY trivy-sbom yes no 1.46s
✅ REPOSITORY trufflehog yes no 5.55s
✅ XML xmllint 35 0 0.1s
✅ YAML prettier 16 0 1.21s
✅ YAML v8r 16 0 20.64s
✅ YAML yamllint 16 0 0.69s

See detailed report in MegaLinter reports

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Feb 25, 2025

Code Coverage Report

Overall Project 74.57% 🍏
Files changed 100% 🍏

File Coverage
TumorkonferenzMapper.java 100% 🍏

@cfischer27
Copy link
Collaborator Author

es gibt zur Tumorkonferenz noch die Info Meldeanlass aus dem OBDS, die nicht im IG abgebildet ist. Lassen wir diese Info also auch einfach weg?

@cfischer27 cfischer27 requested review from a team and pcvolkmer and removed request for a team February 25, 2025 14:16
.getMengeTypTherapieempfehlung()
.getTypTherapieempfehlung()
.get(i));
therapieEmpfehlungen.addCoding(code);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich denke es wäre hier passender eine CarePlanActivityDetailComponent pro getTypTherapieempfehlung statt alle in ein coding.

Copy link
Collaborator Author

@cfischer27 cfischer27 Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so wie ich das verstehe, ist die CarePlanActivityDetailComponent ist ja eigentlich das Element detail. Laut IG darf das nur einmal pro activity gesetzt werden. Deswegene sind die getTypTherapieempfehlung alle in einem coding gelandet. Und es gibt ja für alle Therapieempfehlungen nur einmal die Info zur AbweichungPatientenwunsch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stimmt! Dann wohl eher mehrere activity:
image

Die eine Information zu Abweichung_Patientenwunsch müsste man dann in jedem der Einträge der Activity setzen

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hier hänge ich gerade leider etwas. Ich bekomms aktuel nur hin, dass in einer activity zwei details angezeigt werden und nicht zwei activities. Selbst wenn ich zwei CarePlanActivityComponents erstelle und diese einzelnt oder als Liste hinzufüge, wird das ganze nur als neues detail angezeigt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mit:

for (String typ :
          tk.getTherapieempfehlung().getMengeTypTherapieempfehlung().getTypTherapieempfehlung()) {
        Coding code =
            new Coding()
                .setSystem(fhirProperties.getSystems().getMiiCsOnkoTherapieTyp())
                .setCode(typ);
        CodeableConcept therapieEmpfehlungen = new CodeableConcept(code);

        CarePlan.CarePlanActivityDetailComponent cpadc =
            new CarePlan.CarePlanActivityDetailComponent();
        cpadc.setCode(therapieEmpfehlungen);

        // detail.Status
        cpadc.setStatus(CarePlan.CarePlanActivityStatus.COMPLETED);
        // detail.StatusReason
        cpadc.setStatusReason(
            new CodeableConcept(
                new Coding()
                    .setSystem(fhirProperties.getSystems().getMiiCsOnkoTherapieabweichung())
                    .setCode(tk.getTherapieempfehlung().getAbweichungPatientenwunsch().value())));

        carePlan.addActivity().setDetail(cpadc);
      }

Bekomm ich mit Testpatient_prostata.xml:

{
  "resourceType": "CarePlan",
  "id": "893ccaf0f99449d7ca78315b47ef45b1c8cbdc393d61ce34eaf9cbb71d7f89d9",
  "meta": {
    "profile": [ "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/StructureDefinition/mii-pr-onko-tumorkonferenz" ]
  },
  "identifier": [ {
    "system": "https://bzkf.github.io/obds-to-fhir/identifiers/tumorkonferenz-id",
    "value": "Tumorkonferenz_112"
  } ],
  "status": "active",
  "intent": "plan",
  "category": [ {
    "coding": [ {
      "system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-therapieplanung-typ",
      "code": "praeth"
    } ]
  } ],
  "subject": {
    "reference": "Patient/any"
  },
  "created": "2020-05-25T00:00:00+02:00",
  "addresses": [ {
    "reference": "Condition/any"
  } ],
  "activity": [ {
    "detail": {
      "code": {
        "coding": [ {
          "system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-therapie-typ",
          "code": "OP"
        } ]
      },
      "status": "completed",
      "statusReason": {
        "coding": [ {
          "system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-therapieabweichung",
          "code": "U"
        } ]
      }
    }
  }, {
    "detail": {
      "code": {
        "coding": [ {
          "system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-therapie-typ",
          "code": "ST"
        } ]
      },
      "status": "completed",
      "statusReason": {
        "coding": [ {
          "system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-therapieabweichung",
          "code": "U"
        } ]
      }
    }
  } ]
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so sahs bei mir auch aus. Nur dass das ja dann im FHIR-Profil der Kardinalität von detail wiederspricht

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dann stimmt deins aber schon! Die activity selber darf 0..* sein, innerhalb der activity dann das detail nur 1..1. (Das detail selber kann auch gar nicht mehr als 1 gesetzt sein). So wie oben sind es praktisch 2 activity mit jeweils einem detail.

}
cpadc.setCode(therapieEmpfehlungen);
// detail.Status
cpadc.setStatus(CarePlan.CarePlanActivityStatus.COMPLETED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muss man den status abhängig von getAbweichungPatientenwunsch setzen? Also heißt abweichung "J" dass die empfehlung gemacht wurde weil der Patient es wollte, oder dass sie nicht gemacht wurde trotz empfehlung 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gute Frage. Können wir das überhaupt erkennen. Hier ist ja auch wieder der Punkt, dass mehere Therapien empfolen werden können und wir nicht wissen, auf welche sich getAbweichungPatientenwunsch bezieht

Copy link

github-actions bot commented Mar 4, 2025

Trivy image scan report

ghcr.io/bzkf/obds-to-fhir:pr-251 (debian 12.7)

No Vulnerabilities found

No Misconfigurations found

Java

No Vulnerabilities found

No Misconfigurations found

carePlan.setStatus(CarePlan.CarePlanStatus.ACTIVE);
}
// intent
carePlan.setIntent(CarePlan.CarePlanIntent.PROPOSAL);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
carePlan.setIntent(CarePlan.CarePlanIntent.PROPOSAL);
carePlan.setIntent(CarePlan.CarePlanIntent.PLAN);

Hör lieber nicht auf mich, es ist doch im IG als "plan" hard-codiert... Ich hab nochmal nachgefragt ob Proposal doch sinnvoller ist: https://mii.zulipchat.com/#narrow/channel/255455-MII-Onko/topic/Therapieabweichung/near/503284376

🙈

@@ -67,3 +67,4 @@ node_modules/

# generated code
src/generated/
.approval_tests_temp/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new CarePlan.CarePlanActivityDetailComponent();
cpadc.setCode(therapieEmpfehlungen);
// detail.Status
cpadc.setStatus(CarePlan.CarePlanActivityStatus.COMPLETED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich denke die logik müsste sein: wenn tk.getTherapieempfehlung().getAbweichungPatientenwunsch().value() == "Ja", dann, dann cpadc.setStatus(CarePlan.CarePlanActivityStatus.CANCELLED); und setStatusReason() auf das "ja".

Wenn getAbweichungPatientenwunsch().value() == "Nein", wäre cpadc.setStatus mMn identisch mit CarePlan.Status. Also wenn der gesamte Plan noch aktiv ist (nicht meldeanlass == behandlungsende), dann auch in-progress, und ansonsten completed. Dann muss auch kein statusReason gesetzt werden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants