Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow relatesTo in 105 #176

Merged
merged 1 commit into from Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions input/fsh/SimplifiedPublish.fsh
Expand Up @@ -15,7 +15,6 @@ A profile on the DocumentReference resource for MHD Simplified Publish constrain
Simplified Publish
- Similar to Minimal Metadata constraints
- must be status current
- must **not** be a replacement request
- must have a patient indicated
- uses attachment.data to carry the document, rather than attachment.url
- so that the Simplified Publish is a simple POST of the DocumentReference
Expand All @@ -34,8 +33,7 @@ Simplified Publish
* date 0..1 MS
* author 0..* MS
* authenticator 0..1
* relatesTo 0..0
* relatesTo ^short = "replace is not supported by Simplified Publish"
* relatesTo 0..* MS
* description 0..1
* securityLabel 0..* MS
* content 1..1
Expand Down
18 changes: 12 additions & 6 deletions input/images-source/ITI-105-seq.plantuml
Expand Up @@ -3,10 +3,16 @@ title Publish Document Bundle [ITI-105]
hide footbox
participant "Document Source" as DocumentSource
participant "Document Recipient" as DocumentRecipient
activate "DocumentSource"
activate "DocumentRecipient"
"DocumentSource" -> "DocumentRecipient" : 1. Request to publish document [ITI-105]
"DocumentRecipient" --> "DocumentSource" : 2. Document published [ITI-105]
deactivate "DocumentSource"
deactivate "DocumentRecipient"
autonumber
activate DocumentSource
activate DocumentRecipient
DocumentSource -> DocumentRecipient : Request to publish document [ITI-105]
DocumentRecipient -> DocumentRecipient : Validate DocumentReference
DocumentRecipient -> DocumentRecipient : Extract the document
DocumentRecipient -> DocumentRecipient : Revise DocumentReference to point at document
DocumentRecipient --> DocumentRecipient : Create SubmissionSet from DocumentReference and context
DocumentRecipient --> DocumentRecipient : persist (e.g. XDS Provide and Register)
DocumentRecipient --> DocumentSource : Document published [ITI-105]
deactivate DocumentSource
deactivate DocumentRecipient
@enduml
5 changes: 3 additions & 2 deletions input/images-source/ITI-106-seq.plantuml
Expand Up @@ -3,13 +3,14 @@ hide footbox
autonumber
participant "Document Consumer" as DocumentConsumer
participant "Document Recipient" as DocumentRecipient
autonumber
activate DocumentConsumer
activate DocumentRecipient
DocumentConsumer -> DocumentRecipient : Generate Metadata (document)
DocumentRecipient -> DocumentRecipient : Extract the document
DocumentRecipient -> DocumentRecipient : Create DocumentReference from document
DocumentRecipient --> DocumentRecipient : Create SubmissionSet from DocumentReference
DocumentRecipient -> DocumentRecipient : persist (e.g. XDS Provide and Register)
DocumentRecipient --> DocumentRecipient : Create SubmissionSet from DocumentReference and context
DocumentRecipient --> DocumentRecipient : persist (e.g. XDS Provide and Register)
DocumentConsumer <-- DocumentRecipient : Generated DocumentReference
deactivate DocumentConsumer
deactivate DocumentRecipient
Expand Down
2 changes: 1 addition & 1 deletion input/pagecontent/1331_actors_and_transactions.md
Expand Up @@ -214,7 +214,7 @@ For more details see the detailed [ITI-68 transaction description](ITI-68.html).

#### 1:33.1.2.5 Simplified Publish

This transaction is used to publish a document and metadata. This transaction does not support publishing multiple documents, or replacing document entries. This transaction will produce a simplified SubmissionSet based solely on the DocumentReference and local configuration for metadata conversion.
This transaction is used to publish a document and the document metadata. This transaction does not support publishing multiple documents. This transaction will produce a simplified SubmissionSet based solely on the DocumentReference, security context between Document Source and Document Recipient, and local configuration for metadata conversion.

For more details see the detailed [ITI-105 transaction description](ITI-105.html).

Expand Down
29 changes: 24 additions & 5 deletions input/pagecontent/ITI-105.md
@@ -1,4 +1,4 @@
This section corresponds to transaction [ITI-105] of the IHE Technical Framework. Transaction [ITI-105] is used by the Document Source and Document Recipient Actors. The Simplified Publish [ITI-105] transaction is used to transmit a document and associated metadata.
This section corresponds to transaction [ITI-105] of the IHE Technical Framework. Transaction [ITI-105] is used by the Document Source and Document Recipient Actors. The Simplified Publish [ITI-105] transaction is used to transmit a document and the document metadata.

### 2:3.105.1 Scope

Expand Down Expand Up @@ -41,13 +41,17 @@ The Document Source shall initiate a FHIR “create” action by sending an HTTP

The media type of the HTTP body shall be either `application/fhir+json` or `application/fhir+xml`.

The Simplified Publish message is sent to the base URL as defined in FHIR. See [http://hl7.org/fhir/R4/http.html](http://hl7.org/fhir/R4/http.html) for the definition of “HTTP” access methods and “base”.
The Simplified Publish message is sent to the DocumentReference at the base URL as defined in FHIR. See [http://hl7.org/fhir/R4/http.html](http://hl7.org/fhir/R4/http.html) for the definition of “HTTP” access methods and “base”.
```
[base]/DocumentReference
```

The Document Source shall assure the [Simplified Publish DocumentReference](StructureDefinition-IHE.MHD.SimplifiedPublish.DocumentReference.html) resource are consistent with the [Document Sharing metadata](https://profiles.ihe.net/ITI/TF/Volume3/index.html#4) requirements as specified for attributes [ITI TF-3: Table 4.3.1-3 “Sending Actor Metadata Attribute Optionality”](https://profiles.ihe.net/ITI/TF/Volume3/ch-4.3.html#4.3.1). The Document Source that supports the [Comprehensive Metadata](1332_actor_options.html#13322-xds-on-fhir-option) or the [XDS on FHIR](1332_actor_options.html#13322-xds-on-fhir-option) Options shall assure consistency with column “XDS DS”; otherwise, the Document Source shall assure consistency with column “XDR MS”. The Document Source shall not provide any entryUUID values.
The Document Source shall assure the [Simplified Publish DocumentReference](StructureDefinition-IHE.MHD.SimplifiedPublish.DocumentReference.html) resource are consistent with the [Document Sharing metadata](https://profiles.ihe.net/ITI/TF/Volume3/index.html#4) requirements as specified for attributes [ITI TF-3: Table 4.3.1-3 “Sending Actor Metadata Attribute Optionality”](https://profiles.ihe.net/ITI/TF/Volume3/ch-4.3.html#4.3.1). The Document Source that supports the [Comprehensive Metadata](1332_actor_options.html#13322-xds-on-fhir-option) or the [XDS on FHIR](1332_actor_options.html#13322-xds-on-fhir-option) Options shall assure consistency with column “XDS DS”; otherwise, the Document Source shall assure consistency with column “XDR MS”.
Except that the Document Source does not need to provide any entryUUID values, as the entryUUID will be populated by the Document Recipient when necessary.

###### 2:3.105.4.1.2.1 DocumentReference Resources

For complete information on constructing a FHIR [Simplified Publish DocumentReference](StructureDefinition-IHE.MHD.SimplifiedPublish.DocumentReference.html) Resource has minimal metadata requirements. Recommend to populate all elements possible.
For complete information on constructing a FHIR [Simplified Publish DocumentReference](StructureDefinition-IHE.MHD.SimplifiedPublish.DocumentReference.html) Resource metadata requirements. Recommend to populate all elements possible.

When resources are `contained` , see [ITI TF-3: 4.5.1](32_fhir_maps.html), they shall be contained using the FHIR contained method (see [http://hl7.org/fhir/R4/references.html#contained](http://hl7.org/fhir/R4/references.html#contained) ).

Expand All @@ -63,6 +67,10 @@ The DocumentReference.subject value shall be a Reference to a FHIR Patient Resou

When the [UnContained Reference Option](1332_actor_options.html#13323-uncontained-reference-option) is used, there is no need to populate the sourcePatientInfo element. Otherwise, when sourcePatientInfo is provided, the DocumentReference.context.sourcePatientInfo shall be a reference to a “contained” Patient Resource. That is, the source patient info is encoded in a Patient Resource within the DocumentReference.contained element (see [http://hl7.org/fhir/R4/references.html#contained](http://hl7.org/fhir/R4/references.html#contained) ).

###### 2:3.105.4.1.2.3 Replace, Transform, Signs, and Append Associations

The DocumentReference.relatesTo element indicates an association between DocumentReference resources. The relatesTo.target element in the provided DocumentReference points at the pre-existing DocumentReference that is being replaced, transformed, signed, or appended. The relatesTo.code element in the provided DocumentReference shall be the appropriate relationship type code defined in [http://hl7.org/fhir/R4/valueset-document-relationship-type.html](http://hl7.org/fhir/R4/valueset-document-relationship-type.html). If a DocumentReference will be replaced, the to be replaced DocumentReference needs to be added and updated to status `superseded` within the transaction bundle.

##### 2:3.105.4.1.3 Expected Actions

The Document Recipient shall accept both media types `application/fhir+json` and `application/fhir+xml`.
Expand All @@ -81,7 +89,16 @@ If necessary for processing, the Document Recipient shall retrieve Resources ref

If the Document Recipient encounters any errors or if any validation fails, the Document Recipient shall return an error using a FHIR OperationOutcome. If appropriate, it shall use error codes from [ITI TF-3: Table 4.2.4.1-2](https://profiles.ihe.net/ITI/TF/Volume3/ch-4.2.html#4.2.4.1).

If the Simplified Publish Message contains a DocumentReference Resource with a relatesTo element and the Document Recipient shall return an error.
If the DocumentReference Resource is populated with a relatesTo element and the Document Recipient does not support the relatesTo.code value given, it shall return a warning message, as indicated in *Table 2:3.65.4.1.3-1: Warning message when relatesTo code is not supported*.

**Table 2:3.65.4.1.3-1: Warning message when relatesTo code is not supported**

|relatesTo.code | Warning |
|---------------|-----------|
|replaces | PartialReplaceContentNotProcessed |
|transforms | PartialTransformContentNotProcessed |
|appends | PartialAppendContentNotProcessed |
{: .grid}

###### 2:3.105.4.1.3.1 Grouping with Actors in other Document Sharing Profiles

Expand All @@ -91,6 +108,8 @@ The Document Recipient shall transform the DocumentReference content into a prop

Where values provided are References to FHIR resources (e.g. DocumentReference.encounter), the Reference should be converted to a [Document Sharing `CXi` Identifier Datatype](https://profiles.ihe.net/ITI/TF/Volume3/ch-4.2.html#4.2.3.1.7) for recording in the Document Sharing ebRIM using the Identifier Type Codes when appropriate (See [Appendix Z.9.1.2](https://profiles.ihe.net/ITI/TF/Volume2/ch-Z.html#z.9.1.2-xds-cxi-mapped-to-fhir-identifier-type) ). The conversion may be by using the referenced Resource business .identifier. Note, there is not an obvious coversion of a reference .id to `CXi` identifier. Note that DocumentReference.encounter would be mapped into DocumentEntry.referenceIdList as an Identifier Type Code of `urn:ihe:iti:xds:2015:encounterId`.

If the Provide Document Bundle Message contains a DocumentReference with a relatesTo element, the code shall be translated using the [AssociationType vs RelatesTo ConceptMap](ConceptMap-AssociationTypeVsRelatesTo.html).

Some FHIR elements do not translate to XDS concepts; the handling of these elements is left to the implementer of the Document Recipient.

Upon successful conversion of the FHIR DocumentReference to XDS Document Sharing metadata, the grouped source actor shall execute the appropriate transaction. The transaction result, and any error or warning messages, shall be reported to the MHD Document Source. The Document Recipient is responsible for translating the response to the appropriate HTTP Status Code and FHIR OperationOutcome Resource in the Simplified Publish Response Message.
Expand Down