Hey everyone!
If you are working with New Zealand’s Health Terminology Services (NZHTS) and need to access the Emergency Care Presenting Complaint Reference Set, here’s a quick guide on how to query the API and save the results in CSV format using Postman.
Note: you would need an API key to make this query and If you would like an NZHTS API key to try out this query, email us at standards@tewhatuora.govt.nz with your choice of API client id.
API Query
To query the reference set, you can use the following API URL:
https://nzhts.digital.health.nz/fhir/ValueSet/$expand?url=http://snomed.info/sct/21000210109?fhir_vs=refset/71000210108&_format=csv
This will return a CSV file with a list of presenting complaints based on SNOMED CT codes in New Zealand’s emergency care refset.
Example API Response:
Once you hit the endpoint, the response will be in this format:
system,version,code,display
http://snomed.info/sct,http://snomed.info/sct/21000210109/version/20240401,21522001,Abdominal pain
http://snomed.info/sct,http://snomed.info/sct/21000210109/version/20240401,25786006,Abnormal behaviour
http://snomed.info/sct,http://snomed.info/sct/21000210109/version/20240401,151271000119102,Abnormal blood test
http://snomed.info/sct,http://snomed.info/sct/21000210109/version/20240401,7973008,Abnormal vision
How to Set Up Postman for This API
- Create a New Request:
- In Postman, create a new request and paste the URL:
https://nzhts.digital.health.nz/fhir/ValueSet/$expand?url=http://snomed.info/sct/21000210109?fhir_vs=refset/71000210108&_format=csv
- Set the Method to GET:
- Ensure the request method is set to
GET.
- Send the Request:
- Click on “Send” to execute the request.
- Save Response as CSV:
- After you receive the response in CSV format, click on the “Save Response” dropdown and select Save to File.
- Save the file with a
.csvextension (e.g.,emergency_care_presenting_complaints.csv).
I hope this helps! Feel free to ask if you have any questions about setting this up or working with the API!