Skip to content

Commit

Permalink
feat: added Condition.identifier & Condition.id
Browse files Browse the repository at this point in the history
  • Loading branch information
chgl committed Nov 23, 2024
1 parent 094c568 commit 03504e1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public ConditionMapper(FhirProperties fhirProperties) {
public Condition map(OBDS.MengePatient.Patient.MengeMeldung.Meldung meldung, Reference patient) {
Objects.requireNonNull(meldung);
Objects.requireNonNull(meldung.getTumorzuordnung());
Objects.requireNonNull(meldung.getDiagnose());
Objects.requireNonNull(meldung.getMeldungID());
Objects.requireNonNull(patient);
Validate.isTrue(
Objects.equals(
Expand All @@ -37,6 +39,13 @@ public Condition map(OBDS.MengePatient.Patient.MengeMeldung.Meldung meldung, Ref

var condition = new Condition();

var identifier =
new Identifier()
.setSystem(fhirProperties.getSystems().getConditionId())
.setValue(meldung.getTumorzuordnung().getTumorID());
condition.addIdentifier(identifier);
condition.setId(computeResourceIdFromIdentifier(identifier));

if (meldung.getDiagnose().getDiagnosesicherung() != null) {
Coding verStatus =
new Coding(fhirProperties.getSystems().getConditionVerStatus(), "confirmed", "");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"resourceType": "Condition",
"id": "9896edd80f6833ea17fbb2c5ad5ca42caa1d02f41baea875f4a390be3b372356",
"meta": {
"profile": [ "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/StructureDefinition/mii-pr-onko-diagnose-primaertumor" ]
},
Expand All @@ -16,6 +17,10 @@
"url": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate",
"valueDateTime": "2020-03-01"
} ],
"identifier": [ {
"system": "https://bzkf.github.io/obds-to-fhir/identifiers/primaerdiagnose-id",
"value": "101"
} ],
"verificationStatus": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"resourceType": "Condition",
"id": "a31f38c3b6c0d35e6f228a50ba288b814250c774b8dc89cf5ae36455eb6d1ea8",
"meta": {
"profile": [ "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/StructureDefinition/mii-pr-onko-diagnose-primaertumor" ]
},
Expand All @@ -16,6 +17,10 @@
"url": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate",
"valueDateTime": "2021-07-08"
} ],
"identifier": [ {
"system": "https://bzkf.github.io/obds-to-fhir/identifiers/primaerdiagnose-id",
"value": "111"
} ],
"verificationStatus": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"resourceType": "Condition",
"id": "ada766c1f2eea7625dc4d9bac33d99d0f2a3606376cfa0798fa7c839be6f1e16",
"meta": {
"profile": [ "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/StructureDefinition/mii-pr-onko-diagnose-primaertumor" ]
},
Expand All @@ -16,6 +17,10 @@
"url": "http://hl7.org/fhir/StructureDefinition/condition-assertedDate",
"valueDateTime": "2017-07-02"
} ],
"identifier": [ {
"system": "https://bzkf.github.io/obds-to-fhir/identifiers/primaerdiagnose-id",
"value": "121"
} ],
"verificationStatus": {
"coding": [ {
"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
Expand Down

0 comments on commit 03504e1

Please sign in to comment.