Update MDI Operation
Experimental
This is an early access feature and is subject to change.
OPERATION: POST [base]/Composition/$update-mdi
The Update MDI operation is used for updating active medicolegal death investigations HL7 FHIR MDI Specification.
Supported Resources
This operation has been implemented for the following resources:
- Composition (no documentation page on this yet)
Workflow
Authorization
This operation will require the application obtain authorization to update a Composition using one of the following SMART clinical scopes.
- v1:
[patient|user|system]/Composition.[write|*] - v2:
[patient|user|system]/Composition.[u](future)
Parameters
| Use | Name | Cardinality | Type | Documentation |
|---|---|---|---|---|
| IN | tracking-number | 0..1 | Identifier | Composition.extension:extension-tracking-number of Composition - MDI and EDRS |
| IN | mdi-document | 1..1 | Bundle | MDI Document Bundle |
| OUT | record-created | 1..1 | boolean | Parameter that informs whether or not the update record was processed |
| OUT | id | 1..1 | Identifier | The ID number of the saved MDI Document |
| OUT | warning | 1..1 | OperationOutcome | Informational OperationOutcome (for response only) |
Examples
- Production
- Preview
curl -X POST 'https://fhir.netsmartcloud.com/v4/Composition/$update-mdi' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @payload.json
curl -X POST 'https://fhirtest.netsmartcloud.com/v4/Composition/$update-mdi' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @payload.json
Payloads
Sample Update MDI Request Payload
{
"resourceType":"Parameters",
"id": "TestID",
"parameter":[
{
"name":"jurisdiction defined key 1",
"valueString":"1234"
},
{
"name":"jurisdiction defined key 2",
"valueString":"value"
},
{
"name":"mdi-document",
"resource":{
[Your MDI document bundle goes here in JSON or XML.]
}
}
]
}
Sample Update MDI Response Payload
Update MDI Success
{
"resourceType":"Parameters",
"parameter":[
{
"name":"jurisdiction defined key1",
"valueString":"value1"
},
{
"name":"jurisdiction defined key2",
"valueString":"value2"
},
{
"name":"mdi-document",
"resource":{
"MDI document bundle"
}
},
{
"name":"warning",
"resource":{
"OperationOutcome resource"
}
}
{
"name": "id",
"valueId": "12345"
},
{
"name": "was-created",
"valueBoolean": true
}
]
}
Invalid Update MDI Payload or Other Unprocessable Request
{
"resourceType":"OperationOutcome",
"id":"searchfail",
"text":{
"status":"generated",
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <p>The "case number" 1234 does not exist</p>\n </div>"
},
"issue":[
{
"severity":"fatal",
"code":"case-invalid",
"details":{
"text":"The \"case number\" 1234 does not exist."
}
}
]
}
Errors
Errors will be reported within an OperationOutcome and could include:
| Issue | Description | HTTP Status |
|---|---|---|
| T.B.D. | T.B.D. | 400 Bad Request |
| T.B.D. | T.B.D. | 500 Internal Server Error |
| T.B.D. | T.B.D. | 501 Not Implemented |