... | ... | @@ -39,31 +39,31 @@ Next, the job checks if the Encounter resource already exists in OMOP CDM. This |
|
|
## Medication
|
|
|
<p>
|
|
|
<details>
|
|
|
<summary> Show data flow of Medication and MedicationAdministration resources </summary>
|
|
|
<summary> Show data flow of Medication and MedicationAdministration/MedicationStatement resources </summary>
|
|
|
|
|
|
---
|
|
|
### Medication
|
|
|
|
|
|
When a Medication resource is read in, the job first checks whether this Medication 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 Medication resource does not yet exist in OMOP CDM, it will be written to OMOP CDM as a new resource. If the Medication resource already exists in OMOP CDM, an update will take place in FHIR_ID_TO_OMOP_ID_MAP.
|
|
|
|
|
|
### MedicationAdministration
|
|
|
### MedicationAdministration/Medication Statement
|
|
|
|
|
|
When a MedicationAdministration resource is read in, the job first checks whether the referenced Medication 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 Medication resource already exists in OMOP CDM, the ATC-code in `omop_table` is used for further processing of the MedicationAdministration resource.
|
|
|
When a MedicationAdministration/MedicationStatement resource is read in, the job first checks whether the referenced Medication 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 Medication resource already exists in OMOP CDM, the ATC-code in `omop_table` is used for further processing of the MedicationAdministration/MedicationStatement resource.
|
|
|
|
|
|
Due to the fact that the resource types are read in random order, it may happen that the referenced Medication resource is not yet available in OMOP CDM. In this case, the Medication reference of the MedicationAdministration resource is set as `drug_source_value` in DRUG_EXPOSURE. After all resources have been processed, post-processing takes place. During post processing, the referenced Medication resource is searched in the FHIR_ID_TO_OMOP_ID_MAP table using the Medication reference in `drug_source_value`. If this Medication resource exists in OMOP CDM, an update in DRUG_EXPOSURE takes place.
|
|
|
Due to the fact that the resource types are read in random order, it may happen that the referenced Medication resource is not yet available in OMOP CDM. In this case, the Medication reference of the MedicationAdministration/MedicationStatement resource is set as `drug_source_value` in DRUG_EXPOSURE. After all resources have been processed, post-processing takes place. During post processing, the referenced Medication resource is searched in the FHIR_ID_TO_OMOP_ID_MAP table using the Medication reference in `drug_source_value`. If this Medication resource exists in OMOP CDM, an update in DRUG_EXPOSURE takes place.
|
|
|
|
|
|

|
|
|
|
|
|
</details>
|
|
|
</p>
|
|
|
|
|
|
## Fachabteilungsfall, Procedure, Observation, MedicationAdministration, Condition
|
|
|
## Fachabteilungsfall, Procedure, Observation, MedicationAdministration, MedicationStatement, Condition
|
|
|
<p>
|
|
|
<details>
|
|
|
<summary> Show data flow of Encounter, Procedure, Observation, MedicationAdministration and Condition resources </summary>
|
|
|
<summary> Show data flow of Encounter, Procedure, Observation, MedicationAdministration, MedicationStatement and Condition resources </summary>
|
|
|
|
|
|
---
|
|
|
When a Encounter/Procedure/Observation/MedicationAdministration/Condition resource is read in, the job first checks whether the referenced Patient resource and 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 referenced Patient resource and Encounter resource already exists in OMOP CDM, the existing `person_id` and `visit_occurrence_id` will be used (= `omop_id` from FHIR_ID_TO_OMOP_ID_MAP).
|
|
|
When a Encounter/Procedure/Observation/MedicationAdministration/MedicationStatement/Condition resource is read in, the job first checks whether the referenced Patient resource and 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 referenced Patient resource and Encounter resource already exists in OMOP CDM, the existing `person_id` and `visit_occurrence_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 and Encounter resource is not yet available in OMOP CDM. In this case, a dummy for the Patient resource and a dummy for the Encounter resource is created and written to OMOP CDM. If the "real" Patient resource and Encounter resource is to be written to OMOP CDM during incremental loading, only an update of the dummies takes place.
|
|
|
|
... | ... | @@ -74,7 +74,7 @@ Next the job checks if the read resource (e.g. Condition) already exists in OMOP |
|
|
| Encounter | VISIT_DETAIL | person_id <br> visit_detail_start_datetime <br> visit_occurrence_id |
|
|
|
| Procedure | PROCEDURE_OCCURRENCE | person_id <br> procedure_concept_id <br> procedure_datetime <br> procedure_source_concept_id |
|
|
|
| Observation | OBSERVATION <br> MEASUREMENT | person_id <br> observation/measurement_concept_id <br> observation/measurement_datetime <br> observation/measurement_source_concept_id |
|
|
|
| MedicationAdministration | DRUG_EXPOSURE | person_id <br> drug_concept_id <br> drug_exposure_start_datetime <br> drug_source_concept_id |
|
|
|
| MedicationAdministration, <br> MedicationStatement | DRUG_EXPOSURE | person_id <br> drug_concept_id <br> drug_exposure_start_datetime <br> drug_source_concept_id |
|
|
|
| Condition | CONDITION_OCCURRENCE <br> OBSERVATION <br> PROCEDURE_OCCURRENCE <br> MEASUREMENT | person_id <br> condition/observation/procedure/measurement_concept_id <br> condition_start_datetime / observation/procedure/measurement_datetime <br> condition/observation/procedure/measurement_source_concept_id |
|
|
|
|
|
|
If the read resource does not yet exist in OMOP CDM, it will be written to OMOP CDM as a new resource. If the read resource already exists in OMOP CDM, an update will take place in OMOP CDM based on the corresponding `visit_detail_id`/`procedure_occurrence_id`/`observation_id`/`measurement_id`/`drug_exposure_id`/`condition_occurrence_id`.
|
... | ... | |