Skip to content

Commit

Permalink
feat: add status, code and subject
Browse files Browse the repository at this point in the history
  • Loading branch information
pcvolkmer committed Dec 11, 2024
1 parent 958f926 commit af26860
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,25 @@ public Observation map(ResidualstatusTyp rs, Reference patient) {

var observation = new Observation();

// Subject
observation.setSubject(patient);

// Gesamtbeurteilung des Residualstatus
var code = new CodeableConcept();
code.addCoding()
var value = new CodeableConcept();
value
.addCoding()
.setSystem(fhirProperties.getSystems().getMiiCsOnkoResidualstatus())
.setCode(rs.getGesamtbeurteilungResidualstatus().value());
observation.setValue(code);
observation.setValue(value);

// See: https://loinc.org/84892-9/
var code = new CodeableConcept();
code.addCoding().setCode(fhirProperties.getSystems().getLoinc()).setCode("84892-9");
observation.setCode(value);

// Status
// TODO: Correct status
observation.setStatus(Observation.ObservationStatus.UNKNOWN);

return observation;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"resourceType": "Observation",
"status": "unknown",
"code": {
"coding": [ {
"system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-residualstatus",
"code": "R2"
} ]
},
"subject": {
"reference": "Patient/any"
},
"valueCodeableConcept": {
"coding": [ {
"system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-residualstatus",
"code": "R2"
} ]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"resourceType": "Observation",
"status": "unknown",
"code": {
"coding": [ {
"system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-residualstatus",
"code": "R0"
} ]
},
"subject": {
"reference": "Patient/any"
},
"valueCodeableConcept": {
"coding": [ {
"system": "https://www.medizininformatik-initiative.de/fhir/ext/modul-onko/CodeSystem/mii-cs-onko-residualstatus",
"code": "R0"
} ]
}
}
}

0 comments on commit af26860

Please sign in to comment.