MedMij:V2019.01 FHIR PDFA

Uit informatiestandaarden
Versie door Ardon Toonstra (overleg | bijdragen) op 15 apr 2019 om 16:10 (Ophoging patchnummer)
Naar navigatie springen Naar zoeken springen

{{#customtitle:MedMij FHIR Implementation Guide: PDF/A 1.2.2}}


Naar medmij.nl
PDF/A
AfsprakenstelselFunctioneelTechnischAfspraken-Functioneel-Technisch

Introduction

Go to functional design

MedMij specifies the format PDF/A for exchanging unstructured documents containing health information. Forum Standaardisatie is a Dutch governmental organization that aims to stimulate the use of open standards. PDF/A is one of the standards that is recommended by Forum Standaardisatie. More information regarding PDF/A can be found here: https://www.forumstandaardisatie.nl/standaard/pdf-a1.

To achieve exchange of PDF/A files, MedMij adopts as much as possible from the Mobile access to Health Documents (MHD) profile from Integrating the Healthcare Enterprise (IHE) that defines a RESTful/HTTP interface to an XDS environment using HL7 FHIR STU3 resources. The MHD profile is written to be content agnostic and as such is suitable for much more than PDF/A. For this use case, we have limited the scope to PDF/A.

MedMij includes the IHE MHD profile as a framework to exchange PDF/A documents. The next section summarizes MHD and contains references to this specification. The following section provides an adaptation of the MHD profile to specify exchange of PDF/A documents in a MedMij context. For example, the MHD actors and transactions are put into perspective of the MedMij actors and systems. The essence of the MHD profile is outlined and example transaction messages have been added.

Note: this page is part of the MedMij FHIR Implementation Guide and is a technical representation of the functional design published on this wiki page.

IHE MHD specification

Mobile access to Health Documents (MHD) profile defines a simple HTTP interface to an XDS like environment. It describes four transactions:

  1. submit submission sets, folders, new documents, and document metadata from the mobile device to a document receiver (Provide Document Bundle),
  2. find submission sets matching query parameters (Find Document Manifest),
  3. find document entries containing metadata based on query parameters (Find Document Reference),
  4. retrieve a copy of a specific document (Retrieve Document).

These transactions leverage the document content and format agnostic metadata concepts from XDS but simplify them for access by constrained environments such as mobile devices, or other resource-constrained systems. The MHD profile does not replace XDS. It can be used to allow mobile devices, or other resource-constrained systems, access to an XDS health information exchange.[1]

Wiki: Mobile acces to Health Document (MHD)

Document: MHD Supplement (Rev 2.3 July 24, 2017)

Additional Supplement: Appendix Z on HL7 FHIR

Underlying Standards:

Exchanging PDF/A documents

Go to Afsprakenstelsel

This section summarizes the IHE MHD profile to exchange PDF/A documents in a MedMij context.

This FHIR implementation guide assumes that the PHR system is able to make a connection to the right XIS that contains the patient's information. It does not provide information on finding the right XIS nor does it provide information about security. Moreover, each transaction is performed in the context of a specific authenticated patient, for whose context (token) has been established using the authentication mechanisms described in the 'Afsprakenstelsel'. Each XIS Gateway is required to perform filtering based on the patient associated with the context for the request, so only the records associated with the authenticated patient are returned. For this reason, search parameters should not be included for patient identification.

Actors and transactions involved

Table 1 shows the relevant actors, systems and FHIR capability statements in a MedMij context. The capability statements demonstrate the minimum requirements to be conformant to the full MHD specifications.

Persons Systems FHIR Capability Statements
Name Description Name Description Name Description
Patient The user of a personal healthcare environment. PHR Personal health record Verwijzing.png CapabilityStatement: Client PDFA FHIR Client requirements
Healthcare Provider The user of a XIS XIS Healthcare information system Verwijzing.png CapabilityStatement: Server PDFA FHIR Server requirements

Table 1. Actors, systems and FHIR capability statements

Table 2 shows the MHD actors and transactions in perspective of the systems used in a MedMij context.

Person System MHD Actors MHD Transactions
Patient
PHR
Document Consumer Find Document Manifest
Find Document Reference
Retrieve Document
Healthcare provider
XIS
Document Responder Find Document Manifest
Find Document Reference
Retrieve Document

Table 2. MHD actors and transactions in perspective of systems in a MedMij context

Transactions in scope

  • Find Document Manifests – This transaction is used to issue parameterized queries that result in a list of Document Manifest resources.
  • Find Document References – This transaction is used to issue parameterized queries that produce a list of Document Reference resources.
  • Retrieve Document – This transaction is used to get documents.

Document Consumer shall implement at least one transaction: Find Document Manifests, Find Document References, or Retrieve Document. Document Responder shall implement all transactions.

Transactions out of scope

The MHD profile specifies how to send documents from a Document Source to a Document Receiver using the Provide Document Bundle transaction. However, sending PDF/A documents is currently out of scope for the MedMij context. The 'Afsprakenstelsel' first focuses on pulling data from a XIS to a PHR before considering push transactions. In the future, specifications of sending PDF/A documents from a PHR will be added.

Find and retrieve existing PDF/A document(s)

Find PDF/A or PDF/A collection

Discovery of PDF/A documents is done with the MHD defined transaction 'Find Document Reference' or 'Find Document Manifest.' The Find Document Reference retrieves FHIR DocumentReference Resources that represents a single reference to document per resource, for example, one PDF/A file. The Find Document Manifest retrieves FHIR DocumentManifest Resources. A DocumentManifest Resource gathers a set of DocumentReference Resources into a single package together with metadata that applies to the collection.

The Document Consumer requests DocumentReference or DocumentManifest Resources, matching a set of criteria, from the Document Responder. The Document Responder returns DocumentReference or DocumentManifest Resources that match the search criteria provided by the Document Consumer.

Request message

Search

The Document Consumer executes an HTTP GET conform to the FHIR RESTfull and search specification. A search query would have the following format.

GET [base]DocumentReference?[parameters]{&_format=[mime-type]}
GET [base]DocumentManifest?[parameters]{&_format=[mime-type]}

Example query to search for DocumentReferences of type Discharge summary with a current status.

GET http://example.org/fhir/DocumentReference?type=http://loinc.org|18842-5&status=current

Search Parameters The Document Consumer shall include search parameter status. The Document Consumer may supply, and the Document Responder shall be capable of processing, all query parameters listed below. These search parameters are a selection of the defined search parameters by the HL7 FHIR specification (search parameters: DocumentReference, DocumentManifest). See also the HL7 FHIR STU3 specification for searching.

DocumentReference DocumentManifest
Name Type Description Name Type Description
indexed date When this document reference was created created date When this document manifest created
author (author.given and author.family) string Who and/or what authored the document author (author.given and author.family) string Who and/or what authored the manifest
type token Kind of document (LOINC if possible) type token Kind of document set
class token Categorization of document source uri The source system/application/software
status token current / superseded status token current / superseded
setting token Additional details about where the content was created (e.g. clinical specialty)
period date Time of service that is being documented
facility token Kind of facility where patient was seen
event token Main clinical acts documented
securitylabel token Document security-tags
format token Format/content rules for the document
related-id token Identifier of related objects or events

The PDF/A use cases within MedMij especially use of the search parameters indexed and status for DocumentReference and created and status for DocumentManifest.

Response message

The Document Responder shall process the query to discover the DocumentReference or DocumentManifest entries that match the search parameters given. The Document Responder returns an HTTP Status code appropriate to the processing as well as a Bundle including the matching DocumentReference or DocumentManifest Resources. When the Document Responder needs to report an error or warning, it shall use HTTP error response codes and should include a FHIR OperationOutcome with more details on the failure or warning. If the request message is processed successfully, whether or not any DocumentReference or DocumentManifest Resources are found, the HTTP status code shall be 200.

  • The Document Responder shall place into the 'DocumentReference.content.attachment.url' element a full URL that can be used by the Document Consumer to retrieve the document using Retrieve Document transaction.
    • The Document Responder shall only include references which are resolved through the Document Responder to maintain control over the authentication and authorization. The Document Responder shall only serve DocumentReference or DocumentManifest resources that contain a reference which the Document Consumer may resolve.
  • The Document Responder shall return only PDF/A documents and shall place into the 'DocumentReference.content.attachment.contentType' element the value 'application/pdf'.

Example of a response message

Example of a Bundle with 11 DocumentReference Resources. Only the first DocumentReference is displayed.

 
<Bundle xmlns="http://hl7.org/fhir">
    <id value="c0beb362-efc7-4cb9-b35a-c6cea0742156" />
    <meta>
        <versionId value="1498fcb4-af9c-404f-b445-e6634619df55" />
        <lastUpdated value="2017-10-25T11:25:00.336+00:00" />
    </meta>
    <type value="searchset" />
    <total value="11" />
    <link>
        <relation value="self" />
        <url value="http://vonk.furore.com/DocumentReference?status=current" />
    </link>
    <entry>
        <fullUrl value="http://vonk.furore.com/DocumentReference/c4f22730-bb5a-4f12-b4ef-c7bde0784426" />
        <resource>
            <DocumentReference xmlns="http://hl7.org/fhir">
                <id value="example-pdfa-documentreference2" />
                <meta>
                    <profile value="http://ihe.net/fhir/StructureDefinition/IHE.MHD.Query.Minimal.DocumentReference"/>
                </meta>
                <contained>
                    <Practitioner>
                        <id value="p1"/>
                        <name>
                            <family value="Kneder"/>
                            <given value="B.">
                                <extension url="http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier">
                                    <valueCode value="IN"/>
                                </extension>
                            </given>
                        </name>
                    </Practitioner>
                </contained>
                <masterIdentifier>
                    <system value="urn:ietf:rfc:3986" />
                    <value value="urn:oid:1.2.276.0.7230010.3.1.2.1787205428.3024.1522314975.220899" />
                </masterIdentifier>
                <identifier>
                    <system value="http://example-xis.org/fhir/NamingSystem/DocumentReferenceID"/>
                    <value value="963369"/>
                </identifier>
                <status value="current" />
                <type>
                    <coding>
                        <system value="http://loinc.org/" />
                        <code value="34781-5" />
                        <display value="Infectious disease Consult note" />
                    </coding>
                </type>
                <class>
                    <coding>
                        <system value="http://loinc.org/" />
                        <code value="11488-4" />
                        <display value="Consult Note" />
                    </coding>         
                </class>
                <subject>
                    <reference value="Patient/example-pdfa-kwalificatie1" />
                </subject>
                <indexed value="2017-04-08T15:26:01+01:00" />
                <author>
                    <reference value="#p1" />
                </author>
                <description value="Infectious disease Consult note" />
                <securityLabel>
                    <coding>
                        <system value="http://hl7.org/fhir/v3/Confidentiality" />
                        <code value="V" />
                        <display value="very restricted" />
                    </coding>
                </securityLabel>
                <content>
                    <attachment>
                        <contentType value="application/pdf" />
                        <language value="en" />
                        <url value="http://example-test-server.org/fhir/Binary/example-pdfa-binary2" />
                        <title value="Example PDF - Infectious disease Consult note"/>
                    </attachment>
                </content>
            </DocumentReference>
        </resource>
        <search>
            <mode value="match" />
        </search>
    </entry>
    .......
    

Retrieve PDF/A document

After obtaining the location of the PDF/A document in the DocumentReference.content.attachment.url, the Document Consumer requests the document from the Document Responder. The Document Responder sequentially serves the PDF/A document to the Document Consumer. The context that was established in the initial request shall also apply when retrieving/serving the document contents.

Request Message

This message is an HTTP GET request to retrieve the document. See an example below.

GET http://example:9556/svc/fhir/Binary/1e404af3-077f-4bee-b7a6-a9be97e1ce32

The Document Consumer may provide an HTTP Accept header, according to the semantics of the HTTP protocols (see RFC2616, Section 14.1). The only MIME type assured to be returned is the MIME type indicated in the 'DocumentReference.content.attachment.contentType'. Within MedMij this is set to 'application/pdf'. The HTTP If-Unmodified-Since header shall not be included in the GET request

Response Message

The Document Responder shall process the request message. The Document Responder returns an HTTP Status code appropriate to the processing as well as the content of the requested PDF/A document in the HTTP message-body.

The document may be placed inside a FHIR Binary resource if it is useful to handle pure binary content using the same framework as other resources. Binary resources behave slightly differently from all other resources on the RESTful API. Specifically, when a read request is made for the binary resource that doesn't explicitly specify the FHIR content types "application/fhir+xml" or "application/fhir+json", then the content should be returned using the content type stated in the resource. e.g. if the content type in the resource is "application/pdf", then the content should be returned as a PDF directly.[2]

When the Document Responder needs to report an error or warning, it shall use HTTP error response codes and should include a OperationOutcome with more details on the failure or warning. If the Retrieve Document message is processed successfully the HTTP status code shall be 200.

Example of a response message

<Binary>
  <id value="1e404af3-077f-4bee-b7a6-a9be97e1ce32" />
  <meta>
    <versionId value="948f3653-c9a3-4831-bae5-f629319c194f" />
    <lastUpdated value="2017-09-20T17:55:14.098+00:00" />
  </meta>
  <contentType value="application/pdf" />
  <content value="JVBERi0xLjUNJeLjz9MNCjU1I........"/>   
</Binary>

Interactions, operations, search parameters

Interactions

The following logical interactions are needed for this use case:

Operations

There are no defined operations for this use case.

Search parameters

The following search parameter types need to be supported for this use case. No search result parameters need to be supported.

Search parameter types:

List of StructureDefinitions

IHE has defined StructureDefinitions and other Conformance resources applicable to this use case. The FHIR Implementation Guide on the IHE MHD wiki lists these StructureDefinitions.

Find and retrieve existing PDF/A document transaction uses the following StructureDefinitions (links are not resolvable!):

Next to the IHE MHD StructureDefinitions, MedMij uses the following HCIM StructureDefinitions for the response message.

ZIB name NL ZIB name EN FHIR Resource
Patient Patient Patient http://fhir.nl/fhir/StructureDefinition/nl-core-patient
Zorgverlener HealthProfessional Practitioner http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner
Zorgaanbieder HealthcareProvider Organization http://fhir.nl/fhir/StructureDefinition/nl-core-organization

Annex: Document history

Release notes

Release notes can be found on the functional design page.

History

Release Date Description
2019.01 11-03-2019
  • Publication of changes in version 2019.01, conform release notes
  • Moved release notes to the functional design page.
2019.01 11-03-2019 Added StructureDefinitions of HCIMs for administration components which are applicable for this use case.
2018.06 15-10-2018
  • Added document history.
  • Added version in title.
  • XIS constraint based on BITS issue MSFOC-49.