Operation Definition: Search Endpoint
Introduction
Search for active Endpoints where healthcare providers, which a patient has been registered at, make patient data available.
This operation does NOT change content.
Usage
Invocations
POST [base]/$search-endpoint
Parameters (In)
| Name |
Cardinality |
Type |
Documentation |
| patient |
1..1 |
Identifier |
Patient identifier, with system and value |
| apiSpecification |
0..* |
uri |
Canonical ID of API Specification which the Endpoint implements |
Valid patient identifiers
- Personal identity number (sv: personnummer)
- Coordination number (sv: samordningsnummer)
Return Values (Out)
| Name |
Cardinality |
Type |
Documentation |
| return |
1..1 |
Bundle |
Bundle of Endpoints that match the search criteria, together with the Organizations that make available the patient data at the endpoints. The Endpoints are referenced to from the Organizations using the Organization.endpoint element. If no Endpoints match the search criteria, the Bundle will be empty. |
Validation messages
Validation messages are error, information or success messages that are returned as a result of an operation. These messages are returned in a OperationOutcome.
| Error 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 |
|
| 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 http://electronichealth.se/identifier/personnummer, http://electronichealth.se/identifier/samordningsnummer. |
Error |
patient.valueIdentifier.system |
The Identifier.system value of parameter patient must be be from list of valid systems (see section Parameters (In) above) |
| 2-44-9:Invalid parameter. Valid parameters are patient, healthcareProvider. |
Error |
|
|
Examples
Example of request body
This example shows how to search for healthcare providers and the endpoints where they store patient data for the individual with personal identity number 198001092397. Note that the system ID http://electronichealth.se/identifier/personnummer is used for personal identity numbers. The request filters which endpoints should be returned by supplying two apiSpecification parameters.
{
"id": "SearchEndpoint-VaccineAndDiagnosis-RequestBody",
{
"system": "http://electronichealth.se/identifier/personnummer",
}
},
{
"name": "apiSpecification",
"valueUri": "http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-vaccinationer-1"
},
{
"name": "apiSpecification",
"valueUri": "http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-diagnoser-1"
}
]
}
<id value="SearchEndpoint-VaccineAndDiagnosis-RequestBody" />
<system value="http://electronichealth.se/identifier/personnummer" />
<value value="198001092397" />
</valueIdentifier>
</parameter>
<name value="apiSpecification" />
<valueUri value="http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-vaccinationer-1" />
</parameter>
<name value="apiSpecification" />
<valueUri value="http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-diagnoser-1" />
</parameter>
</Parameters>
Example of successful response body
This example shows how the return body can look like when executing the operation, where the search parameters resulted in a match of one Endpoint where one Organization (healthcare provider) stores patient data. The Endpoint is referenced to by the Organization in the Organization.endpoint element, using the Endpoint's logical ID.
{
"id": "102a4565-ff8c-489c-9ce0-392e56451126",
{
"url": "[base]/$search-endpoint"
}
],
{
"fullUrl": "[base]/Endpoint/27a50668-ca2f-4333-9777-26a406944edd",
"id": "27a50668-ca2f-4333-9777-26a406944edd",
"http://electronichealth.se/fhir/NDI/StructureDefinition/endpoint-er"
]
},
{
{
"system": "http://terminology.hl7.org/CodeSystem/endpoint-connection-type",
}
]
}
],
"name": "Journalsystem 1",
{
{
"url": "http://electronichealth.se/fhir/NDI/StructureDefinition/endpoint-payload-actor-definition-er",
"valueCanonical": "http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-vaccinationer-1"
}
]
}
],
"address": "https://journalsystem1.exempel/fhir"
}
},
{
"fullUrl": "[base]/Organization/fb968068-aeaa-4795-9624-8664b74e64bc",
"id": "fb968068-aeaa-4795-9624-8664b74e64bc",
"http://electronichealth.se/fhir/NDI/StructureDefinition/organization-er"
]
},
],
{
{
"system": "http://snomed.info/sct",
"version": "http://snomed.info/sct/45991000052106",
"code": "143591000052106",
}
]
}
],
{
"reference": "Endpoint/27a50668-ca2f-4333-9777-26a406944edd"
}
]
}
}
]
}
<Bundle xmlns="http://hl7.org/fhir">
<id value="102a4565-ff8c-489c-9ce0-392e56451126" />
<type value="searchset" />
<url value="[base]/$search-endpoint" />
</link>
<fullUrl value="[base]/Endpoint/27a50668-ca2f-4333-9777-26a406944edd" />
<Endpoint>
<id value="27a50668-ca2f-4333-9777-26a406944edd" />
<profile value="http://electronichealth.se/fhir/NDI/StructureDefinition/endpoint-er" />
</meta>
<system value="http://terminology.hl7.org/CodeSystem/endpoint-connection-type" />
<code value="hl7-fhir-rest" />
</coding>
</connectionType>
<name value="Journalsystem 1" />
<extension url="http://electronichealth.se/fhir/NDI/StructureDefinition/endpoint-payload-actor-definition-er">
<valueCanonical value="http://electronichealth.se/ntk/ActorDefinition/Utbildningsmiljo/exempel-vaccinationer-1" />
</extension>
</payload>
<address value="https://journalsystem1.exempel/fhir" />
</Endpoint>
</resource>
</entry>
<fullUrl value="[base]/Organization/fb968068-aeaa-4795-9624-8664b74e64bc" />
<Organization>
<id value="fb968068-aeaa-4795-9624-8664b74e64bc" />
<profile value="http://electronichealth.se/fhir/NDI/StructureDefinition/organization-er" />
</meta>
<system value="urn:oid:2.5.4.97" />
<value value="5564362068" />
</identifier>
<system value="http://snomed.info/sct" />
<version value="http://snomed.info/sct/45991000052106" />
<code value="143591000052106" />
</coding>
</type>
<reference value="Endpoint/27a50668-ca2f-4333-9777-26a406944edd" />
</endpoint>
</Organization>
</resource>
</entry>
</Bundle>
Examples of failed response body
Errors are communicated by using a OperationOutcome that contains an error code and message in the issue.details element. The issue.severity indicates whether the issue is the cause of a failure, warning, information or success.
This example shows how an error is expressed when the format of a patient identifier is incorrect.
{
"id": "da2501bb-9efb-41a9-b0c7-266ab9dc6c2a",
{
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"display": "Invalid format of personal identity number. Submit the personal identity number using 12 digits with or without hyphen, e.g. 198001032385."
}
]
},
}
]
}
<id value="da2501bb-9efb-41a9-b0c7-266ab9dc6c2a" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<display value="Invalid format of personal identity number. Submit the personal identity number using 12 digits with or without hyphen, e.g. 198001032385." />
</coding>
</details>
</issue>
</OperationOutcome>
This example shows how an error is expressed when the system of a patient identifier is unknown.
{
"id": "1c227876-4b09-4adf-8bb0-629973bce4f6",
{
{
"system": "http://electronichealth.se/CodeSystem/error-codes",
"display": "Invalid system. Valid systems are http://electronichealth.se/identifier/personnummer, http://electronichealth.se/identifier/\nsamordningsnummer."
}
]
},
}
]
}
<id value="1c227876-4b09-4adf-8bb0-629973bce4f6" />
<system value="http://electronichealth.se/CodeSystem/error-codes" />
<display value="Invalid system. Valid systems are http://electronichealth.se/identifier/personnummer, http://electronichealth.se/identifier/\nsamordningsnummer." />
</coding>
</details>
</issue>
</OperationOutcome>