Operation Definition: Unregister Index Record (MeRI)

Introduction

Unregisters an index record of a healthcare provider and patient.

See Create Index Record for documentation on how to register an index record of a healthcare provider and a patient. If an index record that has been unregistered is to be registered again, it should be created as a new one using the CreateIndexRecord operation.

This operation changes content.

Usage

Invocations

POST [base]/$unregister-index-record

Parameters (In)

Name Cardinality Type Documentation
patient 1..1 Identifier (system and value) Patient identifier
healthcareProvider 1..1 Identifier (system and value) Healthcare provider identifier

Valid patient identifier systems

  • Swedish personal identity number (sv: personnummer)
    • system: http://electronichealth.se/identifier/personnummer
    • value format: 12 digits with or without hyphen, e.g. 198001032385
  • Swedish coordination number (sv: samordningsnummer)
    • system: http://electronichealth.se/identifier/samordningsnummer
    • value format: 12 digits with or without hyphen, e.g. 201903682399

Valid healthcare provider identifier systems

  • Swedish personal identity number (sv: personnummer)
    • system: http://electronichealth.se/identifier/personnummer
    • value format: 12 digits with or without hyphen, e.g. 198001032385
  • Swedish organization identifier (sv: organisationsnummer)
    • system: urn:oid:2.5.4.97
    • value format: 10 digits with or without hyphen, e.g. 5560269986

Return Values (Out)

Name Cardinality Type Documentation
return 1..1 OperationOutcome OperationOutcome with result of operation

Validation messages

These validation messages are error, information or success messages that SHOULD be returned in the OperationOutcome response.

Message Severity Parameter Comment
2-44-1: Required parameter missing. Error Parameters with cardinality 1..N must be supplied
2-44-2: Invalid format of personal identity number. Submit the personal identity number using 12 digits with or without hyphen, e.g. 198001032385. Error patient.valueIdentifier.value, healthcareProvider.valueIdentifier.value
2-44-3: Invalid format of coordination number. Submit the coordination number using 12 digits with or without hyphen, e.g. 198000602394. Error patient.valueIdentifier.value
2-44-4: Invalid system. Valid systems are %s. Error patient.valueIdentifier.system, healthcareProvider.valueIdentifier.system The Identifier.system values of parameters patient and healthcareProvider must be be from list of valid systems (see section Parameters (In) above)
2-44-7: Invalid format of organization identifier. Submit the organization identifier using 10 digits without hyphen, e.g. 5560269986. Error healthcareProvider.valueIdentifier.system
2-44-9: Invalid parameter. Valid parameters are %s patient, healthcareProvider. Error
2-44-100: Required attribute missing in JWT token. Error Attribute client_id required.
4-44-301: Index record unregistered successfully. Success
4-44-302: Index record was not found. Information

Examples

The following section includes examples of request bodies and corresponding response bodies when successfully or unsuccessfully invoking UnregisterIndexRecord.

Successful request and response

Request body

This example shows how to unregister an index record for a patient with a personal identity number at a healthcare provider with an organization identifier.

{
"resourceType": "Parameters",
"id": "UnregisterIndexRecord-PersonalIdentityNumber-RequestBody",
{
"name": "patient",
"system": "http://electronichealth.se/identifier/personnummer",
"value": "198001032385"
}
},
{
"name": "healthcareProvider",
"system": "urn:oid:2.5.4.97",
"value": "5560269986"
}
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="UnregisterIndexRecord-PersonalIdentityNumber-RequestBody" />
<name value="patient" />
<system value="http://electronichealth.se/identifier/personnummer" />
<value value="198001032385" />
</valueIdentifier>
</parameter>
<name value="healthcareProvider" />
<system value="urn:oid:2.5.4.97" />
<value value="5560269986" />
</valueIdentifier>
</parameter>
</Parameters>

This example shows how to unregister an index record for a patient with a coordination number at a healthcare provider with an organization identifier.

{
"resourceType": "Parameters",
"id": "UnregisterIndexRecord-CoordinationNumber-RequestBody",
{
"name": "patient",
"system": "http://electronichealth.se/identifier/samordningsnummer",
"value": "201903682399"
}
},
{
"name": "healthcareProvider",
"system": "urn:oid:2.5.4.97",
"value": "5560269986"
}
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="UnregisterIndexRecord-CoordinationNumber-RequestBody" />
<name value="patient" />
<system value="http://electronichealth.se/identifier/samordningsnummer" />
<value value="201903682399" />
</valueIdentifier>
</parameter>
<name value="healthcareProvider" />
<system value="urn:oid:2.5.4.97" />
<value value="5560269986" />
</valueIdentifier>
</parameter>
</Parameters>

Response body

Example of response body with an OperationOutcome of successful UnregisterIndexRecord operation.

{
"resourceType": "OperationOutcome",
"id": "f1fe77eb-626b-49d8-be65-e8fc9ab3d54a",
"issue": [
{
"severity": "success",
"code": "success",
"details": {
"coding": [
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"code": "4-44-301",
"display": "Index record unregistered successfully."
}
]
}
}
]
}
<OperationOutcome xmlns="http://hl7.org/fhir">
<id value="f1fe77eb-626b-49d8-be65-e8fc9ab3d54a" />
<severity value="success" />
<code value="success" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<code value="4-44-301" />
<display value="Index record unregistered successfully." />
</coding>
</details>
</issue>
</OperationOutcome>

Response when index post is not found

Example of OperationOutcome response when an index post with the supplied healthcare provider and patient was not found. Since the desired state had already been achieved the severity will be "information" with a code of "not-found" to inform that no actions were taken.

{
"resourceType": "OperationOutcome",
"id": "f434502d-363f-4374-816d-3c3795fc187d",
"issue": [
{
"severity": "information",
"code": "not-found",
"details": {
"coding": [
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"code": "4-44-302",
"display": "Index record was not found."
}
]
}
}
]
}
<OperationOutcome xmlns="http://hl7.org/fhir">
<id value="f434502d-363f-4374-816d-3c3795fc187d" />
<severity value="information" />
<code value="not-found" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<code value="4-44-302" />
<display value="Index record was not found." />
</coding>
</details>
</issue>
</OperationOutcome>

Invalid request format and corresponding response

Request body

Example of invalid request body for CreateIndexRecord operation because of wrongly formatted organization identifier of healthcare provider parameter - valueIdentifier.value of first parameter has 9 digits instead of 10, and invalid value of identifier system of patient parameter - http://electronichealth.se/personnummer instead of http://electronichealth.se/identifier/personnummer.

{
"resourceType": "Parameters",
"id": "UnregisterIndexRecord-InvalidFormat-RequestBody",
{
"name": "healthcareProvider",
"system": "urn:oid:2.5.4.97",
"value": "556026998"
}
},
{
"name": "patient",
"system": "http://electronichealth.se/personnummer",
"value": "198001042384"
}
}
]
}
<Parameters xmlns="http://hl7.org/fhir">
<id value="UnregisterIndexRecord-InvalidFormat-RequestBody" />
<name value="healthcareProvider" />
<system value="urn:oid:2.5.4.97" />
<value value="556026998" />
</valueIdentifier>
</parameter>
<name value="patient" />
<system value="http://electronichealth.se/personnummer" />
<value value="198001042384" />
</valueIdentifier>
</parameter>
</Parameters>

Response body

Example of response body with an OperationOutcome of failed UnregisterIndexRecord operation because of invalid format.

The first issue is about a wrongly formatted personal identity number. To specify which parameter the issue pertains to, the diagnostics element shows the path leading to the element in the request body that contains the wrongly formatted value - in this case the valueIdentifier.value element of the healthcareProvider parameter.

The second issue is about an invalid system ID. To specify which parameter the issue pertains to, the diagnostics element shows the path leading to the element in the request body that contains the invalid system value - in this case the valueIdentifier.system element of the patient parameter.

{
"resourceType": "OperationOutcome",
"id": "c88bc3e4-3f37-4d1e-bf53-0556da1c0124",
"issue": [
{
"severity": "error",
"code": "value",
"details": {
"coding": [
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"code": "2-44-7",
"display": "Invalid format of organization identifier. Submit the organization identifier using 10 digits without hyphen, e.g. 5560269986."
}
]
},
"diagnostics": "healthcareProvider.valueIdentifier.value"
},
{
"severity": "error",
"code": "value",
"details": {
"coding": [
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"code": "2-44-4",
"display": "Invalid system. Valid systems are http://electronichealth.se/identifier/personnummer, http://electronichealth.se/identifier/\nsamordningsnummer."
}
]
},
"diagnostics": "patient.valueIdentifier.system"
}
]
}
<OperationOutcome xmlns="http://hl7.org/fhir">
<id value="c88bc3e4-3f37-4d1e-bf53-0556da1c0124" />
<severity value="error" />
<code value="value" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<code value="2-44-7" />
<display value="Invalid format of organization identifier. Submit the organization identifier using 10 digits without hyphen, e.g. 5560269986." />
</coding>
</details>
<diagnostics value="healthcareProvider.valueIdentifier.value" />
</issue>
<severity value="error" />
<code value="value" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<code value="2-44-4" />
<display value="Invalid system. Valid systems are http://electronichealth.se/identifier/personnummer, http://electronichealth.se/identifier/\nsamordningsnummer." />
</coding>
</details>
<diagnostics value="patient.valueIdentifier.system" />
</issue>
</OperationOutcome>