### Example CodeSystem JSON Response Source: https://echidna.fhir.org/docs/api-reference This is an example JSON response for a successful retrieval of a CodeSystem resource. It includes metadata about the CodeSystem, its properties, and its content definition. This response is typically returned when a GET request to a specific CodeSystem ID is successful. ```json { "resourceType": "CodeSystem", "id": "omop-v20250227", "url": "https://fhir-terminology.ohdsi.org", "version": "20250227", "name": "OMOP Concepts", "title": "Observational Medical Outcomes Partnership (OMOP)", "status": "active", "date": "2025-02-27", "publisher": "Observational Health Data Sciences and Informatics (OHDSI)", "content": "not-present", "property": [ { "code": "concept-id", "description": "The OMOP concept_id value for the concept.", "type": "integer" }, { "code": "source-concept-code", "description": "The OMOP concept_code value for the concept.", "type": "Coding" }, { "code": "concept-name", "description": "The OMOP concept_name value for the concept; an unambiguous, meaningful and descriptive name for the Concept.", "type": "string" }, { "code": "domain-id", "type": "code", "description": "The OMOP domain_id of the concept (e.g., 'Condition', 'Drug', 'Procedure')." }, { "code": "domain-concept-id", "type": "code", "description": "The OMOP concept_id for the domain_id." }, { "code": "vocabulary-id", "type": "code", "description": "The OMOP vocabulary_id the concept belongs to (e.g., 'SNOMED', 'RxNorm')." }, { "code": "vocabulary-concept-id", "type": "code", "description": "The OMOP concept_id for the vocabulary_id." }, { "code": "concept-class-id", "type": "code", "description": "The OMOP concept_class_id of the concept (e.g., 'Clinical Finding', 'Ingredient')." }, { "code": "concept-class-concept-id", "type": "code", "description": "The OMOP concept_id for the concept_class_id." }, { "code": "standard-concept", "type": "code", "description": "Indicates if the concept is a standard concept in OMOP ('S'), a classification concept ('C'), or non-standard ('NS')." }, { "code": "inactive", "type": "boolean", "description": "Boolean value indicating whether a concept is active." }, { "code": "valid-start-date", "type": "dateTime", "description": "The date when the Concept was first recorded. The default value is 1-Jan-1970, meaning, the Concept has no (known) date of inception." }, { "code": "valid-end-date", "type": "dateTime", "description": "The date when the Concept became invalid because it was deleted or superseded (updated) by a new concept. The default value is 31-Dec-2099, meaning, the Concept is valid until it becomes deprecated." }, { "code": "invalid-reason", "type": "code", "description": "The reason the Concept was invalidated. Possible values are D (deleted), U (replaced with an update) or omitted (NULL) when valid_end_date has the default value." }, { "code": "Maps to", "type": "Coding", "description": "Concept maps to another concept, often in a different vocabulary." }, { "code": "Mapped from", "type": "Coding", "description": "Concept is mapped from another concept. Inverse of 'Maps to'." }, { "code": "Is a", "type": "Coding", "description": "Concept is a subtype of another concept. Primary hierarchical relationship." }, { "code": "Subsumes", "type": "Coding", "description": "Concept A subsumes concept B. Inverse of 'Is a'." } ] } ``` -------------------------------- ### GET /r5/CodeSystem/{id}/$lookup Source: https://echidna.fhir.org/docs/api-reference Retrieves details for a code from a specific CodeSystem resource instance on the server, identified by its logical ID. This endpoint uses GET parameters to specify the code, version, and desired properties. ```APIDOC ## GET /r5/CodeSystem/{id}/$lookup ### Description Retrieves details for a code from a specific CodeSystem resource instance on the server, identified by its logical ID, using GET parameters. ### Method GET ### Endpoint /r5/CodeSystem/{id}/$lookup ### Parameters #### Path Parameters - **id** (string) - Required - The logical ID of the CodeSystem instance. Example: `omop-v20250827` #### Query Parameters - **code** (string) - Required - The code that is to be located. Example: `1576196` - **version** (string) - Optional - The version of the CodeSystem, if applicable. Defaults to `"20250827"`. Example: `20250827` - **property** (array string[]) - Optional - A property that the client wishes to be returned in the output. Possible values include: `*`, `concept-id`, `source-concept-code`, `concept-name`, `domain-id`. ### Request Example ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$lookup?code=1576196&version=20250827&property=*' ``` ### Response #### Success Response (200) - **resourceType** (string) - Indicates the resource type, expected to be "Parameters". - **parameter** (array) - An array of parameters representing the lookup results. - **name** (string) - The name of the parameter (e.g., "system", "name", "version", "code", "display", "designation", "property"). - **valueUri** (string) - The URI value for parameters like "system". - **valueString** (string) - The string value for parameters like "name", "version", "display". - **valueCode** (string) - The code value for parameters like "code". - **part** (array) - Used for complex parameters like "designation" and "property", containing nested name-value pairs. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "name", "valueString": "OMOP Concepts" }, { "name": "version", "valueString": "20250227" }, { "name": "code", "valueCode": "1576196" }, { "name": "display", "valueString": "Family history of ischemic heart disease and other diseases of the circulatory system" }, { "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "value", "valueString": "Family hx of ischem heart dis and oth dis of the circ sys" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "concept-id" }, { "name": "value", "valueInteger": 1576196 } ] } // ... other property parameters ] } ``` ``` -------------------------------- ### Lookup code in any CodeSystem by URL (GET) Source: https://echidna.fhir.org/docs/api-reference Retrieves details for a code from a CodeSystem identified by its canonical URL. This endpoint uses GET parameters to specify the code, system, version, and desired properties. ```APIDOC ## GET /r5/CodeSystem/$lookup ### Description Retrieves details for a code from a CodeSystem identified by its canonical URL, using GET parameters. ### Method GET ### Endpoint /r5/CodeSystem/$lookup ### Parameters #### Query Parameters - **code** (string) - Required - The code that is to be located. - **system** (string) - Required - The canonical URI of the CodeSystem. - **version** (string) - Optional - The version of the CodeSystem, if applicable. Defaults to "20250827". - **property** (array string[]) - Optional - A property that the client wishes to be returned in the output. Possible values: `*`, `concept-id`, `source-concept-code`, `concept-name`, `domain-id`. ### Request Example ``` curl 'https://echidna.fhir.org/r5/CodeSystem/$lookup?code=1576196&system=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827&property=*' ``` ### Response #### Success Response (200) - **resourceType** (string) - Indicates the resource type, which is "Parameters" for this response. - **parameter** (array) - An array of parameters containing the details of the looked-up code and its properties. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "name", "valueString": "OMOP Concepts" }, { "name": "version", "valueString": "20250227" }, { "name": "code", "valueCode": "1576196" }, { "name": "display", "valueString": "Family history of ischemic heart disease and other diseases of the circulatory system" }, { "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "value", "valueString": "Family hx of ischem heart dis and oth dis of the circ sys" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "concept-id" }, { "name": "value", "valueInteger": 1576196 } ] } ] } ``` #### Error Responses - **400**: Client error - **404**: Not found - **429**: Rate limit exceeded - **500**: Server error ``` -------------------------------- ### Lookup Code in CodeSystem by ID (Shell Curl) Source: https://echidna.fhir.org/docs/api-reference This example demonstrates how to use curl to perform a lookup of a code within a specific CodeSystem instance. It specifies the CodeSystem ID, the code to search for, the version, and the properties to retrieve. The response will be in JSON format. ```Shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$lookup?code=1576196&version=20250827&property=*' ``` -------------------------------- ### Validate a code in a CodeSystem by URL (GET) Source: https://echidna.fhir.org/docs/api-reference Validates if a code is present in a CodeSystem using GET parameters. This endpoint allows for quick validation of codes against a specified CodeSystem URL. ```APIDOC ## GET /r5/CodeSystem/$validate-code ### Description Validates if a code is present in a CodeSystem using GET parameters. ### Method GET ### Endpoint /r5/CodeSystem/$validate-code ### Parameters #### Query Parameters - **code** (string) - Required - The code that is to be located - **url** (string) - Required - The canonical URI of the CodeSystem - **version** (string) - Optional - The version of the CodeSystem, if applicable (default: "20250827") - **display** (string) - Optional - The display associated with the code ### Request Example ```json { "example": "curl 'https://echidna.fhir.org/r5/CodeSystem/$validate-code?code=1576196&url=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827&display='" } ``` ### Response #### Success Response (200) - **result** (boolean) - Indicates if the code is valid within the CodeSystem. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "result", "valueBoolean": true } ] } ``` ``` -------------------------------- ### Test Code Subsumption via GET - cURL Source: https://echidna.fhir.org/docs/api-reference This snippet demonstrates how to test the subsumption relationship between two codes in a CodeSystem using a GET request with cURL. It requires the codes, system URI, and optionally a version. The response indicates the subsumption outcome (e.g., equivalent, subsumes, subsumed-by, not-subsumed). ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/$subsumes?codeA=21601461&codeB=36274733&system=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827' ``` -------------------------------- ### Validate a code in a specific CodeSystem instance by ID (GET) Source: https://echidna.fhir.org/docs/api-reference Validates if a code is present in a specific CodeSystem instance identified by its ID, using GET parameters. This allows validation against a particular version or deployment of a CodeSystem. ```APIDOC ## GET /r5/CodeSystem/{id}/$validate-code ### Description Validates if a code is present in a CodeSystem using GET parameters. ### Method GET ### Endpoint /r5/CodeSystem/{id}/$validate-code ### Parameters #### Path Parameters - **id** (string) - Required - The logical ID of the CodeSystem instance #### Query Parameters - **code** (string) - Required - The code that is to be located - **version** (string) - Optional - The version of the CodeSystem, if applicable (default: "20250827") - **display** (string) - Optional - The display associated with the code ### Request Example ```json { "example": "curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$validate-code?code=1576196&version=20250827&display='" } ``` ### Response #### Success Response (200) - **result** (boolean) - Indicates if the code is valid within the CodeSystem. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "result", "valueBoolean": true } ] } ``` ``` -------------------------------- ### CodeSystem Lookup Response Example (JSON) Source: https://echidna.fhir.org/docs/api-reference This JSON object represents a successful response (Status 200) from the CodeSystem/$lookup endpoint. It details the parameters used in the lookup, including system, version, and code, and provides various properties associated with the requested code, such as concept-id, source-concept-code, and display name. ```JSON { "resourceType": "Parameters", "parameter": [ { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "name", "valueString": "OMOP Concepts" }, { "name": "version", "valueString": "20250227" }, { "name": "code", "valueCode": "1576196" }, { "name": "display", "valueString": "Family history of ischemic heart disease and other diseases of the circulatory system" }, { "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "value", "valueString": "Family hx of ischem heart dis and oth dis of the circ sys" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "concept-id" }, { "name": "value", "valueInteger": 1576196 } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "source-concept-code" }, { "name": "value", "valueCoding": { "system": "http://hl7.org/fhir/sid/icd-10-cm", "code": "Z82.4" } } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "domain-id" }, { "name": "value", "valueCode": "Observation" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "vocabulary-id" }, { "name": "value", "valueCode": "ICD10CM" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "concept-class-id" }, { "name": "value", "valueCode": "4-char nonbill code" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "standard-concept" }, { "name": "value", "valueCode": "NS" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "inactive" }, { "name": "value", "valueBoolean": true } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "valid-start-date" }, { "name": "value", "valueDate": "2012-01-01" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "valid-end-date" }, { "name": "value", "valueDate": "2099-12-31" } ] } ] } ``` -------------------------------- ### Validate Code in Specific CodeSystem Instance by ID (GET) - Curl Source: https://echidna.fhir.org/docs/api-reference Validates if a code is present within a specific CodeSystem instance identified by its ID. This GET request uses path parameters for the CodeSystem ID and query parameters for the code, version, and display. It's efficient for validating against a known CodeSystem instance. ```Shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$validate-code?code=1576196&version=20250827&display=' ``` -------------------------------- ### Validate Code in CodeSystem by URL (GET) - Curl Source: https://echidna.fhir.org/docs/api-reference Validates if a code exists in a specified CodeSystem using GET parameters. This method requires the code, CodeSystem URL, and optionally a version and display value. It returns a JSON response indicating the validation result. ```Shell curl 'https://echidna.fhir.org/r5/CodeSystem/$validate-code?code=1576196&url=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827&display=' ``` -------------------------------- ### Test CodeSystem Subsumption using GET Source: https://echidna.fhir.org/docs/api-reference Tests the subsumption relationship between two codes (Code A and Code B) within a specific CodeSystem instance identified by {id}. The result indicates if codes are equivalent, one subsumes the other, or if there is no direct hierarchical relationship. An error is returned if the CodeSystem or codes are not found. ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$subsumes?codeA=21601461&codeB=36274733&version=20250827' ``` -------------------------------- ### GET /r5/CodeSystem/$subsumes Source: https://echidna.fhir.org/docs/api-reference Tests the subsumption relationship between two codes within a CodeSystem identified by its canonical URI using query parameters. ```APIDOC ## GET /r5/CodeSystem/$subsumes ### Description Tests the subsumption relationship between two codes (Code A and Code B) within a CodeSystem identified by its canonical URI. ### Method GET ### Endpoint /r5/CodeSystem/$subsumes ### Parameters #### Query Parameters - **codeA** (string) - Required - The code of the A concept to be tested. - **codeB** (string) - Required - The code of the B concept to be tested. - **system** (string) - Required - The canonical URI of the CodeSystem. - **version** (string) - Optional - The version of the CodeSystem, if applicable. Defaults to "20250827". ### Request Example ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/$subsumes?codeA=21601461&codeB=36274733&system=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827' ``` ### Response #### Success Response (200) - **outcome** (string) - Indicates the subsumption relationship: 'equivalent', 'subsumes', 'subsumed-by', or 'not-subsumed'. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "outcome", "valueCode": "subsumes" } ] } ``` ``` -------------------------------- ### GET /r5/CodeSystem/{id}/$subsumes Source: https://echidna.fhir.org/docs/api-reference Tests the subsumption relationship between two codes (Code A and Code B) within a specific CodeSystem instance identified by {id}. The result indicates if one code is equivalent to, subsumes, or is subsumed by another. ```APIDOC ## GET /r5/CodeSystem/{id}/$subsumes ### Description Tests the subsumption relationship between two codes (Code A and Code B) within a specific CodeSystem instance identified by {id}. The system parameter is implicitly defined by the instance and should not be provided. ### Method GET ### Endpoint /r5/CodeSystem/{id}/$subsumes ### Parameters #### Path Parameters - **id** (string) - Required - The logical ID of the CodeSystem instance #### Query Parameters - **codeA** (string) - Required - The code of the A concept to be tested - **codeB** (string) - Required - The code of the B concept to be tested - **version** (string) - Optional - The version of the CodeSystem, if applicable. Defaults to the latest version if not provided. ### Request Example ```json { "curl": "curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$subsumes?codeA=21601461&codeB=36274733&version=20250827'" } ``` ### Response #### Success Response (200) - **outcome** (string) - The subsumption relationship, can be `equivalent`, `subsumes`, `subsumed-by`, or `not-subsumed`. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "outcome", "valueCode": "subsumes" } ] } ``` ``` -------------------------------- ### Get available CodeSystems Source: https://echidna.fhir.org/docs/api-reference Retrieves a list of available FHIR CodeSystem resources. This endpoint is used to discover and access coded terminology within the Echidna FHIR server. ```APIDOC ## GET /websites/echidna_fhir/r5/CodeSystem ### Description This endpoint facilitates the retrieval of FHIR CodeSystem resources. It allows users to fetch information about the various code systems supported by the Echidna FHIR server. ### Method GET ### Endpoint /websites/echidna_fhir/r5/CodeSystem ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```shell curl https://echidna.fhir.org/r5/CodeSystem ``` ### Response #### Success Response (200) - **resourceType** (string) - The FHIR resource type, which will be 'Bundle'. - **type** (string) - The type of the bundle, typically 'searchset'. - **total** (integer) - The total number of CodeSystem resources found. - **entry** (array) - An array of CodeSystem resource entries. - **resource** (object) - A CodeSystem resource. - **resourceType** (string) - Always 'CodeSystem'. - **id** (string) - The unique identifier for the CodeSystem. - **url** (string) - The canonical URL for the CodeSystem. - **version** (string) - The version of the CodeSystem. - **name** (string) - The short name of the CodeSystem. - **title** (string) - A human-readable title for the CodeSystem. - **status** (string) - The status of the CodeSystem (e.g., 'active'). - **date** (string) - The date the CodeSystem was last updated. - **publisher** (string) - The organization that published the CodeSystem. - **content** (string) - Indicates the content type of the CodeSystem (e.g., 'not-present'). - **property** (array) - An array of properties defined for the CodeSystem. #### Response Example ```json { "resourceType": "Bundle", "type": "searchset", "total": 1, "entry": [ { "resource": { "resourceType": "CodeSystem", "id": "omop-v20250227", "url": "https://fhir-terminology.ohdsi.org", "version": "20250227", "name": "OMOP Concepts", "title": "Observational Medical Outcomes Partnership (OMOP)", "status": "active", "date": "2025-02-27", "publisher": "Observational Health Data Sciences and Informatics (OHDSI)", "content": "not-present", "property": [ { "code": "concept-id", "description": "The OMOP concept_id value for the concept.", "type": "integer" } // ... other properties ] } } ] } ``` #### Error Responses - **400 Bad Request**: Client error. - **404 Not Found**: The requested resource was not found. - **429 Too Many Requests**: Rate limit exceeded. - **500 Internal Server Error**: Server error. ``` -------------------------------- ### Lookup Code in CodeSystem Instance (POST) - cURL Source: https://echidna.fhir.org/docs/api-reference This cURL command demonstrates how to retrieve details for a specific code from a CodeSystem resource instance. It requires the instance ID and sends lookup parameters such as code, system, and version in the request body as a JSON object. ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$lookup' \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "resourceType": "Parameters", "parameter": [ { "name": "code", "valueCode": "1576196" }, { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "version", "valueString": "20250827" } ] }' ``` -------------------------------- ### Lookup Code in CodeSystem using URL (Shell Curl) Source: https://echidna.fhir.org/docs/api-reference This snippet demonstrates how to retrieve details for a specific code from a CodeSystem using its canonical URL via a Shell Curl request. It requires the code, system URL, and optionally a version and properties to return. The response is in JSON format. ```Shell curl 'https://echidna.fhir.org/r5/CodeSystem/$lookup?code=1576196&system=https%3A%2F%2Ffhir-terminology.ohdsi.org&version=20250827&property=*' ``` -------------------------------- ### Lookup Code in CodeSystem using Curl Source: https://echidna.fhir.org/docs/api-reference This snippet demonstrates how to perform a POST request to the CodeSystem $lookup endpoint using cURL. It sends the necessary parameters, including code, system, and version, within a JSON payload. This method is useful for scripting and command-line operations. ```curl curl 'https://echidna.fhir.org/r5/CodeSystem/$lookup' \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "resourceType": "Parameters", "parameter": [ { "name": "code", "valueCode": "1576196" }, { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "version", "valueString": "20250827" } ] }' ``` -------------------------------- ### Test CodeSystem Subsumption using POST Source: https://echidna.fhir.org/docs/api-reference Tests the subsumption relationship between two codes (Code A and Code B) within a specific CodeSystem instance identified by {id}. Parameters are provided in the request body. The result indicates if codes are equivalent, one subsumes the other, or if there is no direct hierarchical relationship. Error handling includes 404 for not found resources and 400 for malformed input. ```shell curl 'https://echidna.fhir.org/r5/CodeSystem/omop-v20250827/$subsumes' \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "resourceType": "Parameters", "parameter": [ { "name": "codeA", "valueCode": "4028071" }, { "name": "codeB", "valueCode": "4185932" }, { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "version", "valueString": "20250827" } ] }' ``` -------------------------------- ### Get CodeSystem by ID Source: https://echidna.fhir.org/docs/api-reference Retrieves a single FHIR CodeSystem resource by its logical ID. ```APIDOC ## GET /r5/CodeSystem/{id} ### Description This endpoint allows for the direct retrieval of a single FHIR CodeSystem resource by its logical id. ### Method GET ### Endpoint /r5/CodeSystem/{id} #### Path Parameters - **id** (string) - Required - The logical ID of the CodeSystem instance. ### Request Example ```bash curl https://echidna.fhir.org/r5/CodeSystem/omop-v20250827 ``` ### Response #### Success Response (200) - **resourceType** (string) - The type of the resource, always 'CodeSystem' for this endpoint. - **id** (string) - The logical ID of the CodeSystem. - **url** (string) - The canonical URL for the CodeSystem. - **version** (string) - The version of the CodeSystem. - **name** (string) - A machine-friendly name for the CodeSystem. - **title** (string) - A human-friendly title for the CodeSystem. - **status** (string) - The status of the CodeSystem (e.g., 'active', 'draft'). - **date** (string) - The date of publication of the CodeSystem. - **publisher** (string) - The name of the publisher of the CodeSystem. - **content** (string) - Indicates the content of the CodeSystem (e.g., 'not-present', 'complete'). - **property** (array) - A list of properties defined for the CodeSystem. #### Response Example ```json { "resourceType": "CodeSystem", "id": "omop-v20250227", "url": "https://fhir-terminology.ohdsi.org", "version": "20250227", "name": "OMOP Concepts", "title": "Observational Medical Outcomes Partnership (OMOP)", "status": "active", "date": "2025-02-27", "publisher": "Observational Health Data Sciences and Informatics (OHDSI)", "content": "not-present", "property": [ { "code": "concept-id", "description": "The OMOP concept_id value for the concept.", "type": "integer" } ] } ``` ``` -------------------------------- ### POST /r5/CodeSystem/$lookup Source: https://echidna.fhir.org/docs/api-reference Retrieves details for a code from a CodeSystem identified by its canonical URL. Parameters are provided in a `Parameters` resource within the request body. ```APIDOC ## POST /r5/CodeSystem/$lookup ### Description Retrieves details for a code from a CodeSystem identified by its canonical URL, sending parameters in a `Parameters` resource in the request body. ### Method POST ### Endpoint /r5/CodeSystem/$lookup ### Parameters #### Request Body - **resourceType** (string) - Required - Must be 'Parameters'. - **parameter** (array of objects) - Required - A list of input parameters. - **name** (string) - The name of the parameter (e.g., 'code', 'system', 'version'). - **valueCode** (string) - The value for a code parameter. - **valueUri** (string) - The value for a URI parameter. - **valueString** (string) - The value for a string parameter. ### Request Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "code", "valueCode": "1576196" }, { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "version", "valueString": "20250827" } ] } ``` ### Response #### Success Response (200) - **resourceType** (string) - The resource type, which is 'Parameters'. - **parameter** (array of objects) - Contains details about the looked-up code, including system, name, version, code, display, designations, and properties. #### Response Example ```json { "resourceType": "Parameters", "parameter": [ { "name": "system", "valueUri": "https://fhir-terminology.ohdsi.org" }, { "name": "name", "valueString": "OMOP Concepts" }, { "name": "version", "valueString": "20250227" }, { "name": "code", "valueCode": "1576196" }, { "name": "display", "valueString": "Family history of ischemic heart disease and other diseases of the circulatory system" }, { "name": "designation", "part": [ { "name": "language", "valueCode": "en" }, { "name": "value", "valueString": "Family hx of ischem heart dis and oth dis of the circ sys" } ] }, { "name": "property", "part": [ { "name": "code", "valueCode": "concept-id" }, { "name": "value", "valueInteger": 1576196 } ] } ] } ``` ``` -------------------------------- ### CodeSystem API Source: https://echidna.fhir.org/docs/intro Endpoints for interacting with CodeSystems, including looking up concepts, validating codes, and checking subsumption. ```APIDOC ## CodeSystem/$lookup ### Description Used to look up a concept and its properties. ### Method POST ### Endpoint /CodeSystem/$lookup ### Parameters #### Request Body - **concept** (object) - Required - The concept to look up. - **system** (string) - Optional - The system URI of the concept. - **version** (string) - Optional - The version of the system. ### Request Example ```json { "concept": { "code": "12345" }, "system": "http://loinc.org" } ``` ### Response #### Success Response (200) - **resultSet** (array) - The matching concepts and their properties. #### Response Example ```json { "resultSet": [ { "code": "12345", "display": "Example Concept", "system": "http://loinc.org" } ] } ``` ## CodeSystem/$validate-code ### Description Used to check if a concept-id is a valid OMOP concept. ### Method POST ### Endpoint /CodeSystem/$validate-code ### Parameters #### Request Body - **code** (string) - Required - The concept ID to validate. - **system** (string) - Required - The system URI. ### Request Example ```json { "code": "45678", "system": "http://snomed.info/sct" } ``` ### Response #### Success Response (200) - **isValid** (boolean) - Indicates if the concept ID is valid. - **display** (string) - The display name of the concept if valid. #### Response Example ```json { "isValid": true, "display": "Valid Concept" } ``` ## CodeSystem/$subsumes ### Description Used to check if one concept is a child of another. ### Method POST ### Endpoint /CodeSystem/$subsumes ### Parameters #### Request Body - **subsumed** (object) - Required - The potential child concept. - **subsuming** (object) - Required - The potential parent concept. ### Request Example ```json { "subsumed": { "code": "98765", "system": "http://snomed.info/sct" }, "subsuming": { "code": "12345", "system": "http://snomed.info/sct" } } ``` ### Response #### Success Response (200) - **outcome** (boolean) - True if the first concept subsumes the second. #### Response Example ```json { "outcome": true } ``` ``` -------------------------------- ### Get CodeSystem by ID (Curl) Source: https://echidna.fhir.org/docs/api-reference Retrieves a specific FHIR CodeSystem resource using its logical ID. This operation requires the CodeSystem's ID as a path parameter. It returns a JSON representation of the CodeSystem or an appropriate error status code. ```shell curl https://echidna.fhir.org/r5/CodeSystem/omop-v20250827 ```