Invoke
The invoke operation is used to invoke a specific operation either at the system, type or instance level. The request body is a parameters resource that contains the input for the operation.
What is required will be dependent on the operation that is being invoked.
This is defined under OperationDefinition.parameter
.
Invocations will return the result as a Parameters resource.
API
System level
R4
- CLI
- Curl
- Typescript
iguhealth api invoke_system r4 --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4/$code --data $Parameters
await client.invoke_system(opCode, {}, R4, parameters);
R4B
- CLI
- Curl
- Typescript
iguhealth api invoke_system r4b --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4b/$code --data $Parameters
await client.invoke_system(opCode, {}, R4B, parameters);
Type level
R4
- CLI
- Curl
- Typescript
iguhealth api invoke_type r4 $ResourceType --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4/${ResourceType}/$code --data $Parameters
await client.invoke_type(opCode, {}, R4, resourceType, parameters);
R4B
- CLI
- Curl
- Typescript
iguhealth api invoke_type r4b $ResourceType --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4b/${ResourceType}/$code --data $Parameters
await client.invoke_type(opCode, {}, R4B, resourceType, parameters);
Instance level
R4
- CLI
- Curl
- Typescript
iguhealth api invoke_instance r4 $ResourceType $ResourceId --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4/${ResourceType}/${ResourceId}/$code --data $Parameters
await client.invoke_instance(opCode, {}, R4, resourceType, id, parameters);
R4B
- CLI
- Curl
- Typescript
iguhealth api invoke_instance r4b $ResourceType $ResourceId --data $Parameters
curl --request POST --header "Authorization: Header" --header "Content-Type: application/fhir+json" ${domain}/w/${tenant}/api/v1/fhir/r4b/${ResourceType}/${ResourceId}/$code --data $Parameters
await client.invoke_instance(opCode, {}, R4B, resourceType, id, parameters);
Example
- Request
- Response
iguhealth api invoke_type r4 ValueSet expand --data '{"resourceType": "Parameters", "parameter": [{"name": "url", "valueUri": "http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"}] }'
{
"resourceType": "ValueSet",
"id": "administrative-gender",
"meta": {
"lastUpdated": "2019-11-01T09:29:23.356+11:00",
"profile": [
"http://hl7.org/fhir/StructureDefinition/shareablevalueset"
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h2>AdministrativeGender</h2><div><p>The gender of a person used for administrative purposes.</p>\n</div><p>This value set includes codes from the following code systems:</p><ul><li>Include all codes defined in <a href=\"codesystem-administrative-gender.html\"><code>http://hl7.org/fhir/administrative-gender</code></a></li></ul></div>"
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
"valueCode": "pa"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode": "normative"
},
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
"valueInteger": 5
},
{
"url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
"valueCode": "4.0.0"
}
],
"url": "http://hl7.org/fhir/ValueSet/administrative-gender",
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:oid:2.16.840.1.113883.4.642.3.1"
}
],
"version": "4.0.1",
"name": "AdministrativeGender",
"title": "AdministrativeGender",
"status": "active",
"experimental": false,
"date": "2019-11-01T09:29:23+11:00",
"publisher": "HL7 (FHIR Project)",
"contact": [
{
"telecom": [
{
"system": "url",
"value": "http://hl7.org/fhir"
},
{
"system": "email",
"value": "[email protected]"
}
]
}
],
"description": "The gender of a person used for administrative purposes.",
"immutable": true,
"compose": {
"include": [
{
"system": "http://hl7.org/fhir/administrative-gender"
}
]
},
"expansion": {
"timestamp": "2024-06-24T01:44:17.580Z",
"contains": [
{
"system": "http://hl7.org/fhir/administrative-gender",
"code": "male",
"version": "4.0.1",
"display": "Male",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments",
"valueString": "Male"
}
]
},
{
"system": "http://hl7.org/fhir/administrative-gender",
"code": "female",
"version": "4.0.1",
"display": "Female",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments",
"valueString": "Female"
}
]
},
{
"system": "http://hl7.org/fhir/administrative-gender",
"code": "other",
"version": "4.0.1",
"display": "Other",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments",
"valueString": "The administrative gender is a value other than male/female/unknown. Where this value is selected, systems may often choose to include an extension with the localized more specific value."
}
]
},
{
"system": "http://hl7.org/fhir/administrative-gender",
"code": "unknown",
"version": "4.0.1",
"display": "Unknown",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments",
"valueString": "A proper value is applicable, but not known. Usage Notes: This means the actual value is not known. If the only thing that is unknown is how to properly express the value in the necessary constraints (value set, datatype, etc.), then the OTH or UNC flavor should be used. No properties should be included for a datatype with this property unless: Those properties themselves directly translate to a semantic of \"unknown\". (E.g. a local code sent as a translation that conveys 'unknown') Those properties further qualify the nature of what is unknown. (E.g. specifying a use code of \"H\" and a URL prefix of \"tel:\" to convey that it is the home phone number that is unknown.)"
}
]
}
]
}
}