Shown below is an example of how a number of OpenMRS module objects would map to FHIR resources , as proposed by Grahame Grieve.
The left side of the relationship indicates the OpenMRS attribute, while the right indicated the FHIR resource mapping.
Code Block |
---|
|
private Integer patientId :: n/a - unused
private Set<PatientIdentifier> identifiers :: Patient.identifier
private Integer patientIdentifierId :: not mapped
private Patient patient :: not mapped
private String identifier :: patient.identifier.value
private PatientIdentifierType identifierType ::
private Integer patientIdentifierTypeId :: mapping table, type id ==> URL
private String format :: not mapped
private Boolean required = Boolean.FALSE :: not mapped
private String formatDescription :: not mapped
private Boolean checkDigit = Boolean.FALSE :: not mapped
private String validator :: not mapped
private LocationBehavior locationBehavior :: not mapped
private UniquenessBehavior uniquenessBehavior :: not mapped
private Location location :: Patient.identifier.assigner (URL)
private Boolean preferred = false :: if true, Patient.identifier.use = usual |
Code Block |
---|
|
protected Integer personId :: [base]/Patient/[personId]
private Set<PersonAddress> addresses = null :: Patient.address
private Integer personAddressId :: not mapped
private Person person :: not mapped
private Boolean preferred = false :: Patient.address.use ? mapping
private String address1 :: Patient.address.line
private String address2 :: Patient.address.line
private String address3 :: Patient.address.line
private String address4 :: Patient.address.line
private String address5 :: Patient.address.line
private String address6 :: Patient.address.line
private String cityVillage :: Patient.address.city
private String countyDistrict :: Patient.address.extension : "http://hl7.org/fhir/Profile/iso-21090#address-part-county", valueString
private String stateProvince :: Patient.address.state
private String country :: Patient.address.country
private String postalCode :: Patient.address.zip
private String latitude :: Patient.address.extension -> Location
private String longitude :: Patient.address.extension -> Location
private Date startDate :: Patient.address.period.start
private Date endDate :: Patient.address.period.end
private Set<PersonName> names = null :: Patient.name
private Integer personNameId :: not mapped
private Person person :: not mapped
private Boolean preferred = false :: Patient.name.use = usual
private String prefix :: Patient.name.prefix
private String givenName :: Patient.name.given
private String middleName :: Patient.name.given
private String familyNamePrefix :: folded into Patent.name.family (else, Patient.name.family with extension http://hl7.org/fhir/Profile/iso-21090#name-qualifer, valueCode = PFX)
private String familyName :: Patent.name.family
private String familyName2 :: Patent.name.family
private String familyNameSuffix :: Patent.name.suffix
private String degree :: Patent.name.suffix
private Set<PersonAttribute> attributes = null ::
private integer personAttributeTypeId :: mapping table that defines how attributes map - whether existing elements or extensions
private String value :: depends on mapping
private String gender :: Patient.gender (mapped: code = M or code = F, code system is http://hl7.org/fhir/v2/0001)
private Date birthdate :: Patient.birthDate
private Boolean birthdateEstimated = false :: Extension if worth mapping
private Boolean deathdateEstimated = false :: Extension if worth mapping
private Boolean dead = false :: if true, and no date, then Patient.deceasedBoolean= true
private Date deathDate :: Patient.deceasedDate
private Concept causeOfDeath :: Patient.extension
private User personCreator :: not mapped (would be in provenance if worth mapping)
private Date personDateCreated :: not mapped (would be in provenance if worth mapping)
private User personChangedBy :: not mapped (would be in provenance if worth mapping)
private Date personDateChanged :: not mapped (would be in provenance if worth mapping)
private Boolean personVoided = false :: if true, Patient.active = false, else Patient.active = true
private User personVoidedBy :: not mapped (would be in provenance if worth mapping)
private Date personDateVoided :: not mapped (would be in provenance if worth mapping)
private String personVoidReason :: not mapped (would be in provenance if worth mapping)
private boolean isPatient :: not mapped |
Code Block |
---|
|
protected String accessionNumber :: Observation.identifier
protected String comment :: Observation.comments
protected ComplexData complexData :: -- not mapped --
protected Concept concept :: Observation.Name
protected Encounter encounter :: Observation.extension http://resources.openmrs.org/doc/fhir/profiles/vitalsigns.xml#encounter "Indicates that the information in the resource was gathered at a particular location"
protected Set<Obs> groupMembers:: Observation.relatedItem.target (type = has-component)
protected Location location :: Observation.extension http://resources.openmrs.org/doc/fhir/profiles/vitalsigns.xml#location
protected Date obsDatetime :: Observation.appliesDateTime
protected Obs obsGroup:: n/a - back links are implicit not explicit
protected Integer obsId :: n/a - goes in the URL e.g. [base]/Observation/[obsId]
protected Order order :: not mapped (at least for now)
protected Person person :: Observation.subject
protected Integer personId :: not mapped
static long serialVersionUID :: not mapped
protected Concept valueCoded :: Observation.valueCodeableConcept
protected ConceptName valueCodedName :: Observation.valueCodeableConcept
protected String valueComplex :: Observation.valueAttachment
protected Date valueDatetime :: Observation.valueDateTime
protected Drug valueDrug :: Observation.valueCodeableConcept
protected Integer valueGroupId :: not mapped
protected String valueModifier :: not mapped
protected Double valueNumeric :: Observation.valueQuantity
protected String valueText:: Observation.valueStirng.valueString |
Code Block |
---|
|
Integer uuid :: n/a - goes in the URL e.g. [base]/Location/[locationId]
String name :: Location.name
String description :: Location.description
String address1 :: Address.line
String address2 :: Address.line
String cityVillage :: Address.city
String stateProvince :: Address.state
String country :: Address.country
String postalCode ::Address.postalCode
String latitude :: Location.position.longitude
String longitude :: Location.position.latitude
String countyDistrict :: Address.district
String address3 :: Address.line
String address4 :: Address.line
String address6 :: Address.line
String address5 :: Address.line
Location parentLocation :: Location.partOf
Set<Location> childLocations :: not mapped |
FHIR Family history resource is map to patient's relations in OpenMRS as follow
Code Block |
---|
|
Integer relationshipId :: not mapped
Person personA :: If PersonA is the requesting patient of family history then it will be mapped to FamilyHistory.subject else person will be map to relation attributes accordingly
Person's Relationships will be map as follow
RelationshipType relationshipType ::
String aIsToB :: FamilyHistory.relation.relationship (if patient resource relation ship is A to B)
String bIsToA :: FamilyHistory.relation.relationship (if patient resource relation ship is B to A)
Person personB :: If PersonA is the requesting patient of family history then it will be mapped to FamilyHistory.subject else person name will be map to FamilyHistory.relation.name
Related person bithday :: FamilyHistory.relation.born[x]
|
FHIR Encounter resource is map with both the visit and encounter of OpenMRS. Below shows the mapping of encounter resource of OpenMRS to FHIR Encounter
Code Block |
---|
|
Integer uuid :: n/a - goes in the URL e.g. [base]/Encounter/[encounterId]
Date encounterDatetime :: Encounter.period
Patient patient :: Encounter.subject
Integer patientId :: not mapped
Set<EncounterProvider> encounterProviders :: Encounter.participant
Location location :: Encounter.location
EncounterType encounterType : not mapped
Set<Order> orders :: not mapped
Visit visit :: Encounter.partOf
|
Below shows the mapping of visit resource of OpenMRS to FHIR Encounter
Code Block |
---|
|
Integer uuid :: n/a - goes in the URL e.g. [base]/Encounter/[encounterId]
Patient patient :: Encounter.subject
VisitType visitType :: not mapped
Concept indication :: Encounter.indication
Location location :: Encounter.location
startDatetime :: Encounter.period
Date stopDatetime :: Encounter.period
Set<Encounter> encounters :: not mapped
|
OpenMRS Encounter is map to FHIR composition resource
Code Block |
---|
|
Integer uuid :: not mapped
Date encounterDatetime :: Composition.date
Patient patient :: Encounter.subject
Integer patientId :: not mapped
Set<EncounterProvider> encounterProviders :: Composition.author
Location location :: Composition.section
EncounterType encounterType : not mapped
Set<Order> orders :: not mapped
Visit visit :: not mapped
Set<Obs> obs :: Composition.section |