Skip to content

Commit

Permalink
chore: updated todos for miracum#42, miracum#31
Browse files Browse the repository at this point in the history
  • Loading branch information
kapsner authored and makampf committed Aug 19, 2022
1 parent 4b5a138 commit 3ebcc2f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ private int insertResources(Bundle bundle) {
.map(
resource ->
new Object[] {
// TODO add encounter id / patient id / encounter_start date here
// this would depend also on the resources, e.g.
// type = "Patient": Encounter-ID: NULL, Patient-ID: Patient.id
// type = "Encounter": Encounter-ID: Encounter.id, Patient.id: REPLACE(jsonb_path_query(Encounter.DATA, '$.subject') ->> 'reference', 'Patient/', '')
// type = "Condition": Encounter-ID: REPLACE(Condition.DATA -> 'encounter' ->> 'reference', 'Encounter/', '')
// type = "Procedure": Encounter-ID: REPLACE(Procedure.DATA -> 'encounter' ->> 'reference', 'Encounter/', '')
// type = "Observation": Encounter-ID: REPLACE(Observation.DATA -> 'encounter' ->> 'reference', 'Encounter/', '')
resource.getIdElement().getIdPart(),
resource.fhirType(),
fhirParser.encodeResourceToString(resource)
Expand Down

0 comments on commit 3ebcc2f

Please sign in to comment.