Apply an ActivityDefinition

Apply a FHIR ActivityDefinition to a subject and create its defined activity resource.

Apply a stored ActivityDefinition to a subject. The resource created by the operation depends on the ActivityDefinition's kind and content.

MethodPath
POST/fhir/R4/ActivityDefinition/:id/$apply

Request

curl --request POST \
  --url "https://api.sandbox.ovok.com/fhir/R4/ActivityDefinition/${ACTIVITY_DEFINITION_ID}/\$apply" \
  --header "Authorization: Bearer ${OVOK_TOKEN}" \
  --header 'Content-Type: application/fhir+json' \
  --data "{\"resourceType\":\"Parameters\",\"parameter\":[{\"name\":\"subject\",\"valueReference\":{\"reference\":\"Patient/${PATIENT_ID}\"}}]}"
ParameterTypeDescription
subjectReferenceSubject for whom to apply the definition.
encounterReferenceOptional encounter context.
practitionerReferenceOptional practitioner context.
organizationReferenceOptional organization context.

Provide the parameters required by the selected ActivityDefinition and the server's implementation.

Response

The response resource type is determined by ActivityDefinition.kind; consult the definition and the operation response for the resulting resource. The server may return an OperationOutcome when the definition cannot be applied.

See the FHIR R4 ActivityDefinition $apply operation for the standard definition.

Last updated on

On this page