Sequoia Project Healthcare Directory Implementation Guide
0.0.10 - CI Build
Sequoia Project Healthcare Directory Implementation Guide - Local Development build (v0.0.10). See the Directory of published versions
Functionality:
Retrieve or Query Resources
These functions operate in two different modes retrieve or query. The distinction is that a retrieve operation only returns a single matching FHIR resource directly as a resource object, whereas a query mode of operation returns a FHIR Bundle containing potentially more that one resource that is associated with the query parameters.
Request:
Request URL: get
Parameter | Description | Additional Information |
---|---|---|
apikey | ApiKey to check permission of retrieve operation | |
\_format | xml or json | Some operations such as create only support xml as detailed elsewhere in this document. |
/id | The Organization.id to directly retrieve | Note that is is not a query parameter; it is the FHIR resource id value allowing direct access. It is used by specifying a REST request similar to .../Organization/1.2.3 where 1.2.3 is the desired Organization resource .id value. |
Request:
Request URL: get
Parameter | Description | Additional Information |
---|---|---|
\_id=string | Return organization of which id equals to \_id | Unlike a retrieve, a query always returns a FHIR bundle. |
\_id=string | Return organization of which id equals to \_id | Unlike a retrieve, a query always returns a FHIR bundle. |
\_zip=string | Return organizations of which postal code equals to \_zip | \_zip should be a US Postal Service value. It may be a partial zip code (less than 5 digits) in which case the query will return all resources with a matching left most zip code. For example \_zip=12345 will return matches with that zip code. A query of \_zip=12 will return directory entities with a left most two digits of 12 and any succeeding right 3 digits. It is equivalent to regular expression of 12*. |
\_radius=miles | Return organizations which are within the specified distance in miles. | Radius based searches require that either 1) the \_zip query parameter be specified will all 5 digits, or 2) that both the \_city and \_state query parameters specified. |
\_active=Boolean | Return organizations of which active equals the specified value (of either true or false). | The Boolean parameter must be either true or false. |
\_identifier=string | Return organizations of which the Organization identifier exactly equals the \_identifier query string. | |
\_sort=orgname | Return the FHIR Bundle sorted by the Organization name attribute. | |
\_start=integer | Return Organizations within the search results set from the \_start index. | |
\_count=integer | Return \_count of searched organizations. If \_count=0, the n it returns number of searched organization with empty Organization list. | Note that using \_start and \_count parameters together allow for convenient paging of the results to only return a manageable amount of queries per response while still allowing acquisition of the full directory. 1) if \_count is not a base 10 number then it is ignored. 2) if \_count > number of matching Organization, it returns all matching organizations. 3) if \_count <= number of matching Organization, it returns at most \_count matching organizations. 4) if \_sort param is available, then it reduces the result after sorting. |
\_name=string | Return organizations of which displayname or at least one aliase starts with the specified string. Please not that only alphanumeric characters are allowed. | \_name:contains=string: Return organizations of which displayname or at least one aliases contains \_name \_name:exact=string: Return organizations of which displayname or at least one aliases is same as \_name. Examples: \_name=Texas (would match "texas organization" and "TEXAS") \_name:exact=Texas (would match "Texas" but not "Texas organization" and not "TEXAS"). \_name:contains=Texas (would match "Texas" and "Texas organization" and "TEXAS" and "Company in Texas USA"). |
\_lastUpdated= [compare] dateString | This class of queries returns the requested entities based on that entitys lastUpdate metadata element. | **gt**: Return organizations of which lastUpdated is greater than \_lastUpdated **ge**: Return organizations of which lastUpdated is greater than or equal to \_lastUpdated **lt**: Return organizations of which lastUpdated is less than \_lastUpdated **le**: Return organizations of which lastUpdated is less than or equal to \_lastUpdated. **eq**: Return organization of which lastUpdated is equal to \_lastUpdated. **ne**: Return organization of which lastUpdated is not equal to \_lastUpdated. Examples: \_lastUpdated=gt2017-12-31(would match 2017-12-31T00:00:01 and 2018-02-03T21:32:09 but not match 2017-12-30T23:59:59) \_lastUpdated=eq2017-12-30(would match 2017-12-30T00:00:01 but not match 2017-12-31T00:00:01 or 2017-12-29T23:59:59) |
Internal Ruby Source Code Function: searchOrganizations(orgs, query_hash) Response: FHIR Bundle of zero or more Organizations potentially limited as per the above query parameters.
CURL examples:
Return the directory of active Organizations:
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml'
-same as-
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml&\_active=true'
Return a directory of inactive Organizations:
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml&\_active=false'
Return list of directory active Organizations with updates on or after 2018-12-31:
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml&\_lastUpdated=ge2018-12-31'
Query for a single organization based on its Organization.id value:
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml&\_id=1.2.1.0'
Query for organizations based on the Organization.name or aliases value(s):
curl 'http://FHIR-BASE-URL/Organization?_apikey=testkey&\_format=xml&\_name=ehr'
Retrieve (not query) and then delete sequence:
curl 'http://FHIR-BASE-URL/Organization/1.1.1.1?_apikey=testkey&\_format=xml'
curl -X DELETE 'http://localhost:80/fhir-stu3/1.0.1/Organization/1.1.1.1?_apikey=testkey&\_format=xml'