Difference between revisions of "MHD-rev2-vol-3"

From IHE Wiki
Jump to navigation Jump to search
Line 114: Line 114:
  
 
Focusing beyond where the complexity belongs, what is the purpose of the MHD profile?  Is it to adapt XDS to mobile devices using FHIR technology where needed or allow the construction of an XDS/FHIR gateway (the MHD Document Recipient and MHD Document Responder) between XDS and FHIR document sharing environments?
 
Focusing beyond where the complexity belongs, what is the purpose of the MHD profile?  Is it to adapt XDS to mobile devices using FHIR technology where needed or allow the construction of an XDS/FHIR gateway (the MHD Document Recipient and MHD Document Responder) between XDS and FHIR document sharing environments?
 +
 +
What attributes are affected by this decision?  All attributes that we would put in FHIR contained areas such as Patient information, Author information, DocumentEntry.repositoryUniqueId, DocumentEntry.URI.  In a natural FHIR environment the patient and author information would come from references to Patient and Practitioner resources stored on existing FHIR servers.  In an XDS-centric environment this information would be included in contained resources.
  
 
'''new things to incorporate''':
 
'''new things to incorporate''':

Revision as of 11:08, 25 June 2014

HL7/FHIR Mapping Overview

Many of the Document Sharing concepts defined in IHE profiles are directly supported by FHIR. FHIR has the concept of a 80/20 rule where they are willing to customize FHIR to support 80% of the features and leave the last 20% to use the defined FHIR extension mechanisms. IHE Document Sharing defines some attributes using the extension mechanism.

FHIR Servers

There is also a difference in architecture between IHE Document Sharing and HL7 FHIR. Looking at XDS there are two actors that would be typically thought of as servers, the Document Repository and Document Registry. In FHIR these would be considered two FHIR servers which are customized to maintain different content and provide different processing. This is not an issue for the MHD profile since MHD focuses on extensions to the Document Source and Document Consumer areas of the profile but it may be important later.

FHIR Resources

The FHIR specification documents pre-defined objects that are to be aggregated to construct a health record. These objects are called Resources. The construct of a profile based on FHIR is to define aggregations and extensions to these objects. The primary resources to support document sharing are the DocumentReference and DocumentManifest resources which correspond to the IHE Document Sharing DocumentEntry and SubmissionSet objects.

Traditional FHIR is based on a REST-style transport where each resource is submitted or retrieved separately. This fits poorly with the existing IHE transactions used in document sharing for submitting content. FHIR also defines a composite submission based on the ATOM protocol that is similar to the MTOM protocol used by existing document sharing profiles.

Resource Extensions

FHIR resources can be extended. An extension is a way to add content to a resource beyond its basic definition.

Contained Resources

This section needs rewriting to distinguish between Resources nested inside other Resources (which is needed for constructing DocumentEntry etc.) and Resources nested inside Atom Feeds (which is needed for constructing the equivalent of RegistryObjectList).

While the FHIR resources DocumentReference and DocumentManifest map to the IHE definitions of DocumentEntry and SubmissionSet, there are differences in the specification of some attributes. IHE defines patient and author information as attributes of the DocumentEntry and SubmissionSet objects where FHIR defines these as separate resources. FHIR resources are never nested, they are referenced so it is not possible to build up a DocumentEntry in FHIR with the same nesting rules. Instead a DocumentEntry maps to a composite of a DocumentReference resource, zero or more Practitioner resources representing the authors, and a Patient resource holding the patient information. This composite of FHIR resources, equivalent to a DocumentEntry, is constructed using a technique in FHIR called contained resources. This is a special set of rules for imposing a nested style of resource composition in a specification that is based on reference and not composition. This submission style can be used with the ATOM protocol but not the REST protocol.

To accommodate the more composed style of IHE Document Sharing objects, FHIR allows normally separate, referenced objects to be bundled into a FHIR resource in a contained object. In this partial example:

<DocumentReference>
   <contained>
      <Patient>
         ...
      </Patient>
   </contained>
   <contained>
      <Practitioner/>
   </contained>
</DocumentReference>

The Patient element

ATOM Feed

The ATOM Feed is used as the bundling mechanism for submissions. It is the only mechanism in FHIR that allows a collection of objects to be sent and have have inter-object relationships coded. From an IHE Document Sharing perspective this accomplishes two things. First it allows DocumentManifest and DocumentReference objects to be bundled together. This is accomplished in ebRIM using the RegistryObjectList object. Second, the FHIR specification requires a different metadata construction style than ebRIM. With ebRIM the document specifics, the author specifics, and the patient specifics are all bundled into one object. This happens with the SubmissionSet, DocumentEntry, and Folder objects. In FHIR the author and patient information is normally submitted as separate objects. A document submission would reference these objects, not include them.

References to other objects

IHE Document Sharing, originally defined on the OASIS ebXML Registry standard, uses independent Association objects to link other objects. The Association objects contain a from-reference a to-reference and a type indicating the purpose of the linkage. Associations are first class objects; they can contain other metadata attributes to refine the meaning of the references they provide.

FHIR references are not built from independent objects but from link attributes defined within the linked object. These references are single direction, an object containing a reference to another object.

Major object types

The major objects defined by IHE Document Sharing map to FHIR resources as follows.

Document Sharing Object FHIR Resource
DocumentEntry DocumentReference
SubmissionSet DocumentManifest
Folder List
Association Embedded reference

Open Issues

MHD001 - Current metadata is referenced as Document Sharing ... Good reference?

MHD002 - In our current binding we use the term DocumentEntry. This maps to an ExtrinsicObject in ebRIM. At the moment in MHD I refer to the equivalent in the FHIR binding as DocumentReference. What wording style is going to move forward? Continue to use DocumentEntry to mean either ExtrinsicObject or DocumentReference depending on binding or use FHIR specific language everywhere?

MHD003 - The volume 3 material is being written as a reference and not a tutorial. Tutorial material should be kept separate.

MHD004 - I am excluding FHIR example XML (and JSON) from our document instead referencing specific pages on the HL7 FHIR website. This will create a lot of web references in the PDF.

MHD005 - The MHD Document Recipient must map Practitioner, Patient, and RelatedPerson into Document Sharing authorPerson elements. The MHD Document Responder will have to choose how it converts authorPerson into one of Practitioner, Patient, and RelatedPerson. One of the following choices must be made in writing the profile: accept the mapping of RelatedPerson to authorPerson (at the MHD Document Recipient) to Practitioner (at the MHD Document Responder) (for example) or add new annotations to the ebRIM format so these can be distinguished. Does the XCN data type allow for the coding of the distinction?

MHD006 - the mapping of classCode and typeCode into the FHIR is confusing. The HL7 interpretation of XDS is that typeCode maps into the FHIR element class and classCode maps into ??? But DocumentReference contains both type [1..1] and class [0..1] elements. I believe we should override the HL7 opinion and map typeCode into type and classCode into class. This leaves one problem at the MHD Document Recipient. An inbound FHIR DocumentReference cannot be translated into a DocumentEntry if the DocumentReference is missing the class element (cardinality [0..1] since classCode is [1..1].

MHD007 - Mapping serviceStartTime and serviceStopTime into context/period is not a real good match. In FHIR:

  • If the start element is missing, the start of the period is not known. If the end element is missing, it means that the period is ongoing.
  • start/stop times are with inclusive boundaries
  • It is not clear that these times in FHIR apply to the “service”. They can apply to many things. It is unclear whether being bound inside the context element fixes the semantics.

MHD008 - The current ebRIM binding allows for coding a person as legalAuthenticator (XCN format) where FHIR allows for coding either Practitioner or Organization. This causes a potential loss of information at the MHD Document Recipient since an Organization cannot be coded given the Document Sharing information model.

MHD009 - Attributes patientId, sourcePatientId, sourcePatientInfo are coded as three separate attributes in the Document Sharing information model. In FHIR they are all part of the Patient structure. Note that in the Document Sharing information model there are two codings of sourcePatientIdentifer: the separate attribute and a part of sourcePatientInfo. I have no idea why but that’s the way it is. A translation between ebRIM and FHIR would require a choice as to which one to use if they are different.

MHD010 - practiceSettingCode - I am clueless where to map this. The FHIR element custodian may be appropriate but it is a stretch.

Needs to be defined as an extension.

MHD011 - referenceId needs a system name URI to label that FHIR Identifier

MHD012 - XDS has both title and description attributes. FHIR has only description. I have mapped DocumentEntry.title into DocumentReference.description and left out DocumentEntry.description. To add it we would have to add an extension.

MHD013 - What is the goal of the MHD profile? This was originally documented under the DocumentEntry.URI attribute semantic mappings section.

This DocumentEntry attribute is used to identify the relevant document repository in various Document Sharing profiles. It is not needed in the FHIR environment. It is used in a SOAP environment to identify the repository holding the document. But, since the possibility of translation from SOAP-based binding to FHIR binding back to SOAP-based binding is possible, it needs to be carried forward to allow this possible future translation. In the FHIR environment it is coded as an extension.

DocumentEntry.URI is only used in the XDM profile for the DocumentEntry to reference the Document on the media. This is semantically similar to the FHIR approach of DocumentReference.location holding a URI that is used in a HTTP GET to retrieve the document contents.

In moving between XDS and FHIR based environments there are two possible semantic rule sets. The first choice is to enforce the XDS environment but with FHIR coding of messages. This implies that the MHD Document Source and MDH Document Consumer are not constructed by FHIR rules but instead by XDS/FHIR rules. This choice makes the MHD Document Recipient easier to interface to the XDS Document Source and the MHD Document Responder easier to interface to the XDS Document Consumer but the construction of the MHD Document Source and MHD Document Consumer more complex because they must conform to both XDS and FHIR rules.

The other choice is to have the MHD Document Source and MHD Document Consumer be constructed purely by FHIR rules. This places the complexity in the MHD Document Recipient and MHD Document Responder.

Focusing beyond where the complexity belongs, what is the purpose of the MHD profile? Is it to adapt XDS to mobile devices using FHIR technology where needed or allow the construction of an XDS/FHIR gateway (the MHD Document Recipient and MHD Document Responder) between XDS and FHIR document sharing environments?

What attributes are affected by this decision? All attributes that we would put in FHIR contained areas such as Patient information, Author information, DocumentEntry.repositoryUniqueId, DocumentEntry.URI. In a natural FHIR environment the patient and author information would come from references to Patient and Practitioner resources stored on existing FHIR servers. In an XDS-centric environment this information would be included in contained resources.

new things to incorporate:

Can point to updates in DSTU
MHD005 - reference HL7 CP relating
DocumentEntry instead of DocumentReference
MHD007 - does existing CP help or hurt?
appendix defining mapping exceptions
class - short definition of classCode 
semantic mapping - catches non-one to one mapping
entryUUID - how go from FHIR to ebRIM
hash - FHIR - base64 encoding? - link to FHIR CP - email from John
time - precision? in FHIR (serviceStartTime etc.)
	need note - must preserve precision
	FHIR may require require minute/second
primaryLanguage
	DocumentEntry.languageCode mapped to DocumentReference.primaryLanguage
Patient resource handling
	contained in communication
	persistence?
	Patient lifecycle referencing
	need use cases for translation

Object Types

This section only offers guidance on how to code FHIR to meet the existing IHE Document Sharing requirement. See Volume 3 of the ITI Technical Framework section 4.2.3 for the IHE Document sharing requirements.

DocumentReference

IHE Document Sharing DocumentEntry corresponds to FHIR DocumentReference.

The text element represents an HTML rendition of the DocumentReference. This example shows that the HTML has been generated (as opposed to hand generated?).

<DocumentReference>
   <text>
      <status value="generated"/>
      <div  xmlns="http://www.w3.org/1999/xhtml">
      </div>
   </text>
 </DocumentReference>

The attributes of the DocumentReference are nested inside the DocumentReference element.

DocumentEntry.author attribute

The Document Sharing information model requires at least an authorPerson, authorTelecommunication, or authorInstitution sub-attribute shall be present when the author attribute is included in the document metadata. This implies that authorRole and authorSpeciality can only be coded if one of authorPerson, authorTelecommunication, or authorInstitution is coded. Furthermore, authorPerson can be coded as either a human or machine author. The following mappings shall be used between ebRIM binding and FHIR binding:

DS Model FHIR resource
human Practitioner or Patient or RelatedPerson
device Device
telecom Can only be coded as an element inside Practitioner, Patient, or RelatedPerson
institution Can only be coded as an organization element inside Practitioner, Patient, and Device. It cannot be coded as part of RelatedPerson.

Note: The MHD Document Recipient must map Practitioner, Patient, and RelatedPerson into Document Sharing authorPerson elements. The MHD Document Responder will have to choose how it converts authorPerson into one of Practitioner, Patient, and RelatedPerson.

Since author is implemented by referencing an independent resource in FHIR and Document Sharing information model requires that it be included in the submission, it is coded in the contained section of the DocumentReference element. An example of this coding in both XML and JSON can be found here.

DocumentEntry.availabilityStatus attribute

DocumentReference.availabilityStatus is coded as the FHIR element DocumentReference.status with the following value mapping:

ebRIM FHIR
urn:oasis:names:tc:ebxml-regrep:StatusType:Approved current
urn:oasis:names:tc:ebxml-regrep:StatusType:Deprecated superceeded

DocumentEntry.classCode attribute

DocumentEntry.classCode is mapped into the FHIR element DocumentReference.class. The following minimal coding shall be provided:

<class>
    <coding>
        <system value="coding scheme value"/>
        <code value="code value"/>
        <display value="display name"/>
    </coding>
</class>

Where system defines the coding scheme the code is taken from. This is frequently an OID although FHIR prefers dereference-able URIs. Code is the code value taken from the coding scheme. Display is the display name for the code provided.

DocumentEntry.confidentialityCode attribute

DocumentEntry.confidentialityCode is mapped into the FHIR element DocumentReference.confidentiality. The following minimal coding shall be provided:

<confidentiality>
    <coding>
        <system value="coding scheme value"/>
        <code value="code value"/>
        <display value="display name"/>
    </coding>
</confidentiality>

Where system defines the coding scheme the code is taken from. This is frequently an OID although FHIR prefers dereference-able URIs. Code is the code value taken from the coding scheme. Display is the display name for the code provided.

DocumentEntry.creationTime attribute

DocumentEntry.creationTime attribute is mapped to the FHIR element DocumentReference.created.

Example coding is:

<created value="2005-12-24T09:35:00+11:00"/>

Note that this requires dateTime XML coding.

DocumentEntry.entryUUID

There is no concept in FHIR corresponding to DocumentEntry.entryUUD. This is an artifact of the ebRIM binding.

DocumentEntry.formatCode attribute

DocumentEntry.formatCode is mapped into the FHIR element DocumentReference.format. The following minimal coding shall be provided:

<confidentiality>
    <coding>
        <system value="coding scheme value"/>
        <code value="code value"/>
        <display value="display name"/>
    </coding>
</confidentiality>

Where system defines the coding scheme the code is taken from. This is frequently an OID although FHIR prefers dereference-able URIs. Code is the code value taken from the coding scheme. Display is the display name for the code provided.

DocumentEntry.hash attribute

DocumentEntry.hash is mapped into the FHIR element DocumentReference.hash. The following coding shall be used:

<hash value="e543712c0e10501972de13a5bfcbe826c49feb75"/>

DocumentEntry.healthcareFacilityTypeCode, DocumentEntry.eventCodeList, DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime attributes

These attributes are coded inside the context element as DocumentReference.event, DocumentReference.period, and DocumentReference.facilityType elements.

  <context>
    <event>
      <coding>
        <system value="http://ihe.net/xds/connectathon/eventCodes"/>
        <code value="T-D8200"/>
        <display value="Arm"/>
      </coding>
    </event>
    <period>
      <start value="2004-12-23T08:00:00"/>
      <end value="2004-12-23T08:01:00"/>
    </period>
    <facilityType>
      <coding>
        <system value="http://www.ihe.net/xds/connectathon/healthcareFacilityTypeCodes"/>
        <code value="Outpatient"/>
        <display value="Outpatient"/>
      </coding>
    </facilityType>
  </context>

Mapping DocumentEntry.serviceStartTime and DocumentEntry.serviceStopTime into context/period is not a real good match. In FHIR:

  • If the start element is missing, the start of the period is not known. If the end element is missing, it means that the period is ongoing.
  • start/stop times are with inclusive boundaries
  • It is not clear that these times in FHIR apply to the “service”. They can apply to many things. It is unclear whether being bound inside the context element fixes the semantics.
  • The format for date/time is dateTime XML coding.

System defines the coding scheme the code is taken from. This is frequently an OID although FHIR prefers dereference-able URIs. Code is the code value taken from the coding scheme. Display is the display name for the code provided.

DocumentEntry.languageCode attribute

DocumentEntry.languageCode is mapped into the FHIR element DocumentReference.primaryLanguage. The following coding shall be used:

<primaryLanguage value="en-US"/>

DocumentEntry.legalAuthenticator attribute

DocumentEntry.legalAuthenticator is mapped to the FHIR element DocumentReference.authenticator. The current ebRIM binding allows for coding a person as legalAuthenticator (XCN format) where FHIR allows for coding either DocumentReference.Practitioner or DocumentReference.Organization.

The following coding shall be used:

<DocumentReference>
    <contained>
        <Practitioner id="auth1"/>
    </contained>
    <authenticator>
        <reference value="#auth1"/>
    </authenticator>
</DocumentReference>

Since Practitioner is a separate FHIR resource it cannot be nested inside authenticator. It must be referenced. Since the Document Sharing information model requires each submission be complete with no external references, the Practitioner resource must be coded as part of the DocumentReference in a contained element.

DocumentEntry.mimeType attribute

DocumentEntry.mimeType is mapped into the FHIR element DocumentReference.mimeType. The following coding shall be used:

<mimeType value="text/plain"/>

DocumentEntry.patientId, DocumentEntry.sourcePatientId, DocumentEntry.sourcePatientInfo attributes

DocumentEntry.patientId, DocumentEntry.sourcePatientId, DocumentEntry.sourcePatientInfo attributes are mapped into the FHIR resource DocumentReference.Patient.

Attributes DocumentEntry.patientId, DocumentEntry.sourcePatientId, DocumentEntry.sourcePatientInfo are coded as three separate attributes in the Document Sharing information model. In FHIR they are all part of the Patient structure. Note that in the Document Sharing information model there are two codings of sourcePatientIdentifer: the separate attribute and a part of sourcePatientInfo. I have no idea why but that’s the way it is. A translation between ebRIM and FHIR would require a choice as to which one to use if they are different.

DocumentEntry.practiceSettingCode attribute

Needs to be defined as a FHIR extension.

DocumentEntry.referenceIdList

DocumentEntry.referenceIdList is mapped into the FHIR element DocumentReference.identifier. The following minimal coding shall be provided:

<identifier>
    <value value="2013001^^^&1.2.3.4.5.6&ISO^urn:ihe:iti:xds:2013:accession"/>
    <system value="URI indicating referenceIdList"/>
</identifier>

DocumentEntry.size attribute

DocumentEntry.size is mapped into the FHIR element DocumentReference.size. The following coding shall be used:

<size value="10234"/>

DocumentEntry.title attribute

DocumentEntry.title is mapped into the FHIR element DocumentReference.description. The following coding shall be used:

<description value="Post-Op Exam"/>

DocumentEntry.typeCode attribute

DocumentEntry.typeCode is mapped into the FHIR element DocumentReference.type. The following minimal coding shall be provided:

<type>
    <coding>
        <system value="coding scheme value"/>
        <code value="code value"/>
        <display value="display name"/>
    </coding>
</type>

Where system defines the coding scheme the code is taken from. This is frequently an OID although FHIR prefers dereference-able URIs. Code is the code value taken from the coding scheme. Display is the display name for the code provided.

DocumentEntry.uniqueId

DocumentEntry.uniqueId is mapped into the FHIR element DocumentReference.masterIdentifier. The following minimal coding shall be provided:

<masterIdentifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:1.3.6.1.4.1.21367.2005.3.7"/>
</masterIdentifier>

DocumentEntry.repositoryUniqueId and DocumentEnty.URI

Semantic Mapping

This discussion is repeated in Open Issue MHD013. Updates to this thread of discussion should be made there and not here.

This DocumentEntry attribute is used to identify the relevant document repository in various Document Sharing profiles. It is not needed in the FHIR environment. It is used in a SOAP environment to identify the repository holding the document. But, since the possibility of translation from SOAP-based binding to FHIR binding back to SOAP-based binding is possible, it needs to be carried forward to allow this possible future translation. In the FHIR environment it is coded as an extension.

DocumentEntry.URI is only used in the XDM profile for the DocumentEntry to reference the Document on the media. This is semantically similar to the FHIR approach of DocumentReference.location holding a URI that is used in a HTTP GET to retrieve the document contents.

In moving between XDS and FHIR based environments there are two possible semantic rule sets. The first choice is to enforce the XDS environment but with FHIR coding of messages. This implies that the MHD Document Source and MDH Document Consumer are not constructed by FHIR rules but instead by XDS/FHIR rules. This choice makes the MHD Document Recipient easier to interface to the XDS Document Source and the MHD Document Responder easier to interface to the XDS Document Consumer but the construction of the MHD Document Source and MHD Document Consumer more complex because they must conform to both XDS and FHIR rules.

The other choice is to have the MHD Document Source and MHD Document Consumer be constructed purely by FHIR rules. This places the complexity in the MHD Document Recipient and MHD Document Responder.

Focusing beyond where the complexity belongs, what is the purpose of the MHD profile? Is it to adapt XDS to mobile devices using FHIR technology where needed or allow the construction of an XDS/FHIR gateway (the MHD Document Recipient and MHD Document Responder) between XDS and FHIR document sharing environments?