... | ... | @@ -24,6 +24,13 @@ When a Patient resource is read in, the job first checks whether this Patient re |
|
|
<details>
|
|
|
<summary> Show data flow of Encounter resources </summary>
|
|
|
|
|
|
---
|
|
|
When a Encounter resource is read in, the job first checks whether the referenced Patient resource already exists in OMOP CDM. This is done in the FHIR_ID_TO_OMOP_ID_MAP table using the logical_id and/or the identifier. If the referenced Patient resource already exists in OMOP CDM, the existing person_id will be used (= omop_id from FHIR_ID_TO_OMOP_ID_MAP).
|
|
|
|
|
|
Due to the fact that the resource types are read in random order, it may happen that the referenced Patient resource is not yet available in OMOP CDM. In this case, a dummy for this Patient resource is created and written to OMOP CDM. If the "real" Patient resource is to be written to OMOP CDM during incremental loading, only an update of the dummy takes place.
|
|
|
|
|
|
Next, the job checks if the Encounter resource already exists in OMOP CDM. This is done in the FHIR_ID_TO_OMOP_ID_MAP table using the logical_id and/or the identifier. If the Encounter resource does not yet exist in OMOP CDM, it will be written to OMOP CDM as a new resource. If the Encounter resource already exists in OMOP CDM, an update will take place in OMOP CDM based on the corresponding visit_occurrence_id (= omop_id from FHIR_ID_TO_OMOP_ID_MAP).
|
|
|
|
|
|

|
|
|
|
|
|
</details>
|
... | ... | |