Skip to main content

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

UseNameCardinalityTypeDocumentation
INtracking-number0..1IdentifierComposition.extension:extension-tracking-number of Composition - MDI and EDRS
INmdi-document1..1BundleMDI Document Bundle
OUTrecord-created1..1booleanParameter that informs whether or not the update record was processed
OUTid1..1IdentifierThe ID number of the saved MDI Document
OUTwarning1..1OperationOutcomeInformational OperationOutcome (for response only)

Examples

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

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 &quot;case number&quot; 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:

IssueDescriptionHTTP 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