...
No | OpenMRS Entity | FHIR Resource | FHIR Maturity Level | Notes |
---|---|---|---|---|
1 | Patient | https://www.hl7.org/fhir/patient.html | 5 | |
2 | Obs | https://www.hl7.org/fhir/observation.html | 5 | |
3 | Encounter | https://www.hl7.org/fhir/encounter.html | 2 | |
4 | Visit | List of encounters can be considered: https://www.hl7.org/fhir/list.html | FHIR's Encounter resource can serve either as an OpenMRS Encounter or OpenMRS Visit. OpenMRS Encounter is a point in time.
| |
5 | Provider | https://www.hl7.org/fhir/practitioner.html | 3 | |
6 | Allergy | https://www.hl7.org/fhir/allergyintolerance.html | 3 | |
7 | Drug | https://www.hl7.org/fhir/medication.html | 3 | |
8 | Location | https://www.hl7.org/fhir/location.html | 3 | |
9 | Order | https://www.hl7.org/fhir/medicationrequest.html | FHIR Nutrition Order and MedicationRequest can be considered, but orders have a broader sense in OpenMRS. Priority would be MedicationRequest (Drug Order) and ProcedureRequest (Test Order) | |
10 | PatientProgram | https://www.hl7.org/fhir/episodeofcare.html | 2 | |
11 | PatientState | https://www.hl7.org/fhir/condition.html | 3 | |
12 | Person | https://www.hl7.org/fhir/person.html | 2 | |
13 | Relationship | https://www.hl7.org/fhir/relatedperson.html | 2 | |
14 | Cohort | https://www.hl7.org/fhir/group.html | 1 |
Synchronizing objects via FHIR
To add another object to FHIR synchronization, you must implement the FHIR Strategy Pattern
...
Code Block |
---|
package org.openmrs.module.fhir.api.strategies.objectname;
import org.hl7.fhir.dstu3.model.Objectname;
public interface GenericObjectnameStrategy {
Objectname getObjectname(String uuid);
void deleteObjectname(String uuid);
Objectname updateObjectname(String uuid, Objectname objectname);
Objectname createObjectname(Objectname objectname);
}
|
...
Code Block |
---|
package org.openmrs.module.fhir.api.strategies.objectname;
import org.openmrs.api.context.Context;
import org.openmrs.module.fhir.api.util.FHIRUtils;
public class ObjectNameStrategyUtil {
public static GenericObjectNameStrategy getObjectNameStrategy() {
String strategy = FHIRUtils.getObjectNameStrategy();
return strategy == null ? new ObjectNameStrategy() :
Context.getRegisteredComponent(strategy, GenericObjectNameStrategy.class);
}
}
|