Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Child pages
  • Form synchronization
Skip to end of metadata
Go to start of metadata

FHIR Mapping

This is a suggestion on how to map OpenMRS Form object into FHIR Questionnaire.

Fields which didn't match into FHIR representation are marked on red. Keyword extension means that FHIR Extension has to be used to synchronize this field.
Fields which partially match into FHIR representation are marked on orange.


Existing extensions for Questionnaire http://hl7.org/fhir/questionnaire-profiles.html


OpenMRS class Form. FHIR class Questionnaire.

OpenMRS classOpenMRS fieldDB fieldFHIR fieldDetails
BaseOpenmrsMetadataname : Stringname : TEXTname : stringMatches well
Formversion : Stringversion : TEXTversion : stringMatches well
Formbuild : Integerbuild : INTextension
Formpublished : Booleanpublished : INTapprovalDate : dateAssume that published = (approvalDate != null)


xslt : ?
Absent in OpenMRS core object


template : ?
Absent in OpenMRS core object
BaseOpenmrsMetadatadescription : Stringdescription : TEXTdescription : markdownMatches well
FormencounterType : EncounterTypeencounter_type : INTextensionTo be put into extension. Only encounterTypeId will be synchronized
FormformFields : Set<FormField>Many to one relationitem : BackboneElementSee FormField object mapping for details
BaseOpenmrsMetadatacreator : Usercreator : INTpublisher : stringFHIR expects text representation of the user's name in this field. OpenMRS uses id of the user
BaseOpenmrsMetadatadateCreated : Datedate_created : DATETIMEextension
BaseOpenmrsMetadatachangedBy : Userchanged_by : INTextension
BaseOpenmrsMetadatadateChanged : Datedate_changed : DATETIMEdate : dateTimeMatches well
BaseOpenmrsMetadataretired : Booleanretired : INT

status : code
(draft | active | retired | unknown)

FHIR status field can be set to "retired"
BaseOpenmrsMetadataretiredBy : Userretired_by : INTextension
BaseOpenmrsMetadatadateRetired : Userdate_retired : DATETIMEextension
BaseOpenmrsMetadataretireReason : Stringretired_reason : TEXTextension
BaseOpenmrsObjectuuid : Stringuuid : TEXTidentifier : IdentifierCan be put as one of the identifiers


OpenMRS class Field extends FormField. FHIR class BackboneElement.

OpenMRS classOpenMRS fieldDB fieldFHIR fieldDetails
BaseOpenmrsMetadataname : Stringname : TEXTtext : stringMatches well
BaseOpenmrsMetadatadescription : Stringdescription : TEXTextension
FieldfieldType : FieldTypefield_type : INT

type : code
(group | display | boolean | decimal | integer | date | dateTime +
QuestionnaireItemType)

FHIR code is required. FHIR type is not designed to hold Id of field_type.
Fieldconcept : Conceptconcept_id : INTextensionOnly Id of the concept will be synchronized. Whole Concepts will be synchronized separately.
FieldtableName: Stringtable_name : TEXTextension
FieldattributeName : Stringattribute_name : TEXTextension
FielddefaultValue : Stringdefault_value : INTinitialString : string
FieldselectMultiple : Booleanselect_multiple : INTextension
Fieldanswers : Set<FieldAnswer>Many to one relation.enableWhen : BackboneElementSee FieldAnswer object mapping.
FormFieldformFieldId : Integerform_field_id : INTlinkId : stringRequired by FHIR.
FormFieldform : Formform_id : INT
Can be deduced from JSON structure.
FormFieldfield : Fieldfield_id : INTextension
FormFieldfieldNumber : Integerfield_number : INTextension
FormFieldfieldPart : Stringfield_part : INTextension
FormFieldpageNumber : Integerpage_number : INTextension
FormFieldparent : FormFieldparent_form_field : INTextensionField Id will be synced.
FormFieldminOccurs : Integermin_occurs : INTextension
FormFieldmaxOccurs : Integermax_occurs : INTextension
FormFieldrequired : Booleanrequired : INTrequired : boolean
FormFieldsortWeight : Floatsort_weight : INTextension
FormFieldfield : Fieldfield_id : INTextensionField Id will be synced.
BaseOpenmrsMetadatacreator : Usercreator : INTextensionUser Id will be synced.
BaseOpenmrsMetadatadateCreated : Datedate_created : DATETIMEextension
BaseOpenmrsMetadatachangedBy : Userchanged_by : INTextensionUser Id will be synced.
BaseOpenmrsMetadatadateChanged : Datedate_changed : DATETIMEextension
BaseOpenmrsMetadataretired : Booleanretired : INTextension
BaseOpenmrsMetadataretiredBy : Userretired_by : TEXTextensionUser Id will be synced.
BaseOpenmrsMetadatadateRetired : Userdate_retired : DATETIMEextensionUser Id will be synced.
BaseOpenmrsMetadataretireReason : Stringretire_reason : TEXTextension
BaseOpenmrsObjectuuid : Stringuuid : TEXTextension

OpenMRS class FieldAnswer.

OpenMRS classOpenMRS fieldDB fieldFHIR fieldDetails
FieldAnswerdateCreated : Datedate_created : DATETIMEextension
FieldAnswerconcept : Conceptanswer_id : INTanswerCoding : Coding
FieldAnswercreator : Usercreator : INTextension
FieldAnswerfield : Fieldfield_id : INT
Can be deduced from JSON structure.
FieldAnswerdirty : boolean

Not saved to db.
BaseOpenmrsObjectuuid : Stringuuid : TEXTextension




  • No labels