CSD
General Information
More detailed information can be found at:
The following schemas are used to describe and validate the structure and content of the MHFL XML data:
Conventions
This interoperability specifications adopted the following conventions:
- Profiles: list the IHE Profiles that map to the list of functions supported by current healthcare information systems. Profiles generally address problems that users can relate to.
- Actors: are information systems or components of information systems, that play a role in the software enterprise. Actors communicate with each other through transactions.
- Transactions: are interactions between actors that use standards-based messages to communicate the required information.
- Interaction Diagrams: are dynamic definitions, to describe the interaction between the sender and receiver in terms of the expected acknowledgements. It illustrates how a profile, functions as a sequence of transactions between the relevant actors.
- Trigger Events: are real-world events, that creates the need for data to flow among healthcare systems.
- Message Structures: are static definitions, to provide a precise definition of the message structure. It also includes reverences to the shared uniform nomenclatures, that is needed to achieve semantic interoperability. In other words, enforcing one interpretation of a value.
- Message Tables: are tables representing the static definition of a message.
- Sample Messages: are sets of ER7 and/or XML example messages, that shows the exchange of information between actors.
- Data Models: are sets of diagrams, that define how complex and primitive data types are connected to each other, processed or stored in a system and is used to describe the data in as much detail as possible.
- National Extensions: are specific local healthcare needs and facilitate local implementation of the IHE Technical Framework. Requirements may be added to the Technical Framework or to specific Profiles, Actors, Transactions or Content Modules. However National Extensions may not relax or introduce conflicting requirements.
Service purpose
- Profiles
- Actors
- Transactions
Profiles are central to documenting detailed specifications and ensuring that users and developers are aligned on the same solution.
Care Services Discovery (CSD)
Care Services Discovery (CSD) is an integration profile that allows applications to query related directories, for example the Master Facility List (MHFL), for organization, facility, service, and provider information.
The following is a high-level description of the directories supported by the CSD profile:
- Organization: The administrative bodies under whose auspices care services are provided, for example Healthcare Information Exchanges (HIEs), Integrated Delivery Networks (IDNs), Non-Government Organizations (NGOs), Faith-Based Organizations (FBOs), or even a one-physician family practice. It has a unique identifier, contact person, and mailing address, and a parent organization can have child organizations.
- Facility: A physical care delivery site, for example hospital, clinic, health outpost, physician office, lab, or pharmacy. It has a unique identifier, address, geocode, contact details, and hours of operation.
- Services: A service that is provided at a facility by a healthcare provider, for example surgical service, antenatal care service, or primary care service. It has a unique identifier, contact person, and hours of operation.
- Provider: A health worker as defined by the WHO, for example physician, nurse, pharmacist, community health worker, or district health manager. It has contact and demographic attributes and is related to one or more organizations, one or more facilities, and one or more healthcare services.
The following actors are assigned to this profile and are supported or implemented in the MHFL:
- Care Services Directory: Maintains definitive data regarding organizations, facilities, services, and providers. It responds to a Care Services InfoManager actor's query request for new and updated content since a specified date and time. It supports time-stamped journaling so data elements are updated to an appropriate deprecation status instead of being deleted. It also maintains the content needed to construct and return XML documents conforming to the CSD XML schema definition. It supports at least one of HTTP POST or SOAP protocols.
- Service Finder: Queries the Care Services InfoManager actor to retrieve interrelated content regarding care services. It issues one or more stored queries to the Care Services InfoManager actor to execute common care service discovery requests. It supports at least one of HTTP POST or SOAP protocols.
- Care Services InfoManager: Refreshes its cached content with updates from one or more Care Services Directory actors on a periodic basis, for example every 20 minutes, and executes inbound queries from a Service Finder actor, for example EVDS, SVS, Mezzanine, or Covid19 Data Lake, against its cached content. It supports at least one of HTTP POST or SOAP protocols.
The following transactions are assigned to the actors and used in the MHFL:
- Find Matching Services [ITI-73]: A request query is expressed in an XML document and submitted as an HTTP POST request by the Service Finder actor that needs to query the Care Services InfoManager actor for interrelated care service content. The Care Services InfoManager actor executes the inbound query and returns the result in an XML document conforming to the CSD XML schema definition.
- Query for Updated Services [ITI-74]: Used by the Care Services InfoManager actor to obtain directory records from the Care Services Directory actor that have been updated since the refresh timestamp provided in the request query. In response, the Care Services Directory actor returns an XML document conforming to the CSD XML schema definition that contains all directory content inserted or updated since the specified refresh timestamp.
MFL Interoperability Specifications
Version: 1.6.32
Message Structures
The following section describes the structure of each message to be communicated between actors and is grouped by the following trigger events:
Trigger Event: Find Matching Services Request message (Stored Query)
The Service Finder actor sends a Find Services Request when it needs to access service information that is maintained by the Care Services InfoManager actor and for which the InfoManager has defined a Stored Query.
Sample Message The following example shows the body of the HTTP POST query request message that is send by a Service Finder actor.
Search by Facility ID:
To find a facility by using its unique-id, you can request it with the following query:
- cURL Request
- Node.js
- Python
- XML Body
curl -X POST -k \
-H 'apikey: fsjDWKIX3pvverEm2Un5bT3zBhGQxwc' \
-H 'Content-Type: application/xml' \
-i https://test-hie.health.gov.za/csd \
--data '<csd:careServicesRequest xmlns:csd="urn:ihe:iti:csd:2013">
<csd:function urn="urn:ihe:iti:csd:2014:stored-function:facility-search">
<csd:requestParams>
<csd:uniqueID entityID="cfe75f79-e84f-475a-abea-8a2be22b9ab0"/>
</csd:requestParams>
</csd:function>
</csd:careServicesRequest>'
import https from 'node:https';
const requestBody = `<?xml version="1.0" encoding="UTF-8"?>
<csd:careServicesRequest xmlns:csd="urn:ihe:iti:csd:2013">
<csd:function urn="urn:ihe:iti:csd:2014:stored-function:facility-search">
<csd:requestParams>
<csd:uniqueID entityID="cfe75f79-e84f-475a-abea-8a2be22b9ab0"/>
</csd:requestParams>
</csd:function>
</csd:careServicesRequest>`;
const request = https.request(
'https://test-hie.health.gov.za/csd',
{
method: 'POST',
rejectUnauthorized: false, // Equivalent to cURL's -k option.
headers: {
apikey: 'fsjDWKIX3pvverEm2Un5bT3zBhGQxwc',
'Content-Type': 'application/xml',
'Content-Length': Buffer.byteLength(requestBody),
},
},
(response) => {
console.log(`Status: ${response.statusCode}`);
response.pipe(process.stdout);
},
);
request.on('error', console.error);
request.end(requestBody);
import requests
request_body = """<?xml version="1.0" encoding="UTF-8"?>
<csd:careServicesRequest xmlns:csd="urn:ihe:iti:csd:2013">
<csd:function urn="urn:ihe:iti:csd:2014:stored-function:facility-search">
<csd:requestParams>
<csd:uniqueID entityID="cfe75f79-e84f-475a-abea-8a2be22b9ab0"/>
</csd:requestParams>
</csd:function>
</csd:careServicesRequest>"""
response = requests.post(
"https://test-hie.health.gov.za/csd",
data=request_body,
headers={
"apikey": "fsjDWKIX3pvverEm2Un5bT3zBhGQxwc",
"Content-Type": "application/xml",
},
verify=False, # Equivalent to cURL's -k option.
timeout=30,
)
response.raise_for_status()
print(response.status_code, response.text)
<csd:careServicesRequest xmlns:csd="urn:ihe:iti:csd:2013">
<csd:function urn="urn:ihe:iti:csd:2014:stored-function:facility-search">
<csd:requestParams>
<csd:uniqueID entityID="cfe75f79-e84f-475a-abea-8a2be22b9ab0"/>
</csd:requestParams>
</csd:function>
</csd:careServicesRequest>
Trigger Event: Find Matching Services Response message (Stored Query)
The Care Services InfoManager actor prepares and returns a Find Matching Services response upon receiving an inbound Find Matching Services query.
Sample Message The following example shows the body of the HTTP POST response message that is received from a Care Services InfoManager actor.
Search by Facility ID response:
<CSD xmlns="urn:ihe:iti:csd:2013">
<facilityDirectory>
<facility entityID="cfe75f79-e84f-475a-abea-8a2be22b9ab0">
<otherID code="825851" assigningAuthorityName="NDOH"/>
<otherID code="7745481" assigningAuthorityName="MFL"/>
<codedType code="C" codingScheme="2.16.710.1.113883.18.900">Clinic</codedType>
<primaryName>Kraaipan Clinic</primaryName>
<otherName>nw Kraaipan Clinic</otherName>
<address type="Office/Business">
<addressLine component="StreetAddress">
Next To Kgatelopele Home Based Care Kraaipan
</addressLine>
<addressLine component="SubDistrict">Ratlou LM</addressLine>
<addressLine component="District">Ngaka Modiri Molema DM</addressLine>
<addressLine component="Province">North West</addressLine>
<addressLine component="Country">South Africa</addressLine>
</address>
<contact>
<person>
<name>
<honorific>Ms</honorific>
<forename>G</forename>
<surname>Lobeko</surname>
</name>
<gender>Female</gender>
</person>
</contact>
<geocode>
<latitude>-26.273700</latitude>
<longitude>25.305400</longitude>
</geocode>
<language code="en" codingScheme="BCP 47">English</language>
<contactPoint>
<codedType code="CP" codingScheme="2.16.710.1.113883.18.202">
0606134480
</codedType>
</contactPoint>
<contactPoint><codedType code="X.400" codingScheme="2.16.710.1.113883.18.202">
kraaipanaclinic@nwpg.gov.za
</codedType>
</contactPoint>
<organizations>
<organization entityID="e26f53d7-0240-4539-bdb6-804434294661"/>
<organization entityID="952b8d10-f27f-483b-a6a1-974575217448">
<service entityID="da87af2a-3f1a-4995-9a55-709d0762db65">
<name>
<commonName>HPRS Implemented</commonName>
</name>
<language code="en" codingScheme="BCP 47">English</language>
</service>
</organization>
</organizations>
<operatingHours>
<openFlag>true</openFlag>
<beginEffectiveDate>1994-01-01T02:00:00.000+02:00</beginEffectiveDate>
</operatingHours>
<extension>
<any>
<area type="Rural"/>
</any>
</extension>
<record created="2020-06-11T02:00:00.000+02:00"
updated="2020-10-29T16:44:08.909+02:00" status="Active"/>
</facility>
</facilityDirectory>
</CSD>

