API Reference

Observation Occupation

Overview

The Observation Occupation resource represents a patient's occupation. Occupation refers to the type of work a person does to earn a living or the principal activity that a person does for pay or profit. This resource captures patient-reported or clinically documented occupation information as part of comprehensive social history and social determinants of health data. At its minimum, Observation contains a specific LOINC code for occupation (11341-5), a status, a reference to the patient, and the occupation value, but may also contain data about the occupation period, industry, and related employment details.

Each Observation Occupation has next elements:

  • a status
  • a code for job history
  • a patient
  • the job code or text

Each Observation Occupation must support:

  • a category code of “social-history”
  • when the job occurred
  • a code for the job history industry
  • the industry code or text

This resource conforms to USCDI v3 profile for Occupation - refer to StructureDefinition US Core Observation Occupation Profile. Observation Occupation response will be provided in JSON (refers to Capability Statement) format as per FHIR standard R4 version.

Must support elements, mandatory and optional search parameters

Observation Occupation must support these elements:

  • status
  • category
    • category:socialhistory
  • code
  • subject
  • effective[x]:effectivePeriod
  • value[x]:valueCodeableConcept
  • component
    • component:industry
      • component.code
      • component.value[x]

The following search parameters and search parameter combinations SHALL be supported:

The syntax used to describe the interactions is described here.

SHALL support searching using the combination of the patient and code search parameters:

  • including optional support for OR search on code (e.g.code={system|}[code],{system|}[code],...) GET [base url]/Observation?patient={Type/}[id]&code={system|}[code]

SHALL support searching using the combination of the patient and category search parameters: GET [base url]/Observation?patient={Type/}[id]&category={system|}[code]

SHALL support searching using the combination of the patient and category and date search parameters:

  • including support for these date comparators: gt,lt,ge,le
  • including optional support for AND search on date (e.g.date=[date]&date=[date]]&...) GET [base url]/Observation?patient={Type/}[id]&category={http://terminology.hl7.org/CodeSystem/observation-category|}social-history&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

The following search parameters and search parameter combinations SHOULD be supported:

SHOULD support searching using the combination of the patient and category and status search parameters:

  • including support for OR search on status (e.g.status={system|}[code],{system|}[code],...) GET [base url]/Observation?patient={Type/}[id]&category={http://terminology.hl7.org/CodeSystem/observation-category|}social-history&status={system|}[code]{,{system|}[code],...}

SHOULD support searching using the combination of the patient and code and date search parameters:

  • including optional support for OR search on code (e.g.code={system|}[code],{system|}[code],...)
  • including support for these date comparators: gt,lt,ge,le
  • including optional support for AND search on date (e.g.date=[date]&date=[date]]&...) GET [base url]/Observation?patient={Type/}[id]&code={system|}[code]{,{system|}[code],...}&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

The response to any search operation is always a list of resources in a Bundle or an Operation Outcome.

Observation Occupation By patient and code search parameters

Get Observation Occupation by combination of the patient and code search parameters.

METHOD GET

[base url]/Observation?patient=[reference]&code={system|}[code]

PARAMS [base url] - FHIR base url [reference] - reference to the Patient {system|} - terminology system (LOINC) [code] - LOINC code 11341-5 or 21843-8 for Occupation

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?patient=1137192&code=http://loinc.org|11341-5' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Observation Occupation By patient and category search parameters

Get Observation Occupation by combination of the patient and category search parameters.

METHOD GET

[base url]/Observation?patient=[reference]&category={system|}[code]

PARAMS [base url] - FHIR base url [reference] - reference to the Patient {system|} - terminology system used to define observation category code [code] - category code (social-history)

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?patient=1137192&category=social-history' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Observation Occupation By patient, category and date search parameters

Get Observation Occupation by combination of the patient, category and date search parameters.

METHOD GET

[base url]/Observation?patient=[reference]&category={http://terminology.hl7.org/CodeSystem/observation-category|}social-history&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

PARAMS [base url] - FHIR base url [reference] - reference to the Patient {system|} - terminology system (http://terminology.hl7.org/CodeSystem/observation-category) [code] - category code (social-history) [date] - effective date of observation

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?patient=1137192&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history&date=ge2023-01-01' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Observation Occupation By patient, category and status search parameters

Get Observation Occupation by combination of the patient, category and status search parameters.

METHOD GET

[base url]/Observation?patient=[reference]&category={http://terminology.hl7.org/CodeSystem/observation-category|}social-history&status={system|}[code]{,{system|}[code],...}

PARAMS [base url] - FHIR base url [reference] - reference to the Patient {system|} - terminology system used to define observation category/status code [code] - category code (social-history) and status code (supports OR search)

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?patient=1137192&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history&status=final' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Observation Occupation By patient, code and date search parameters

Get Observation Occupation by combination of the patient, code and date search parameters.

METHOD GET

[base url]/Observation?patient=[reference]&code={system|}[code]{,{system|}[code],...}&date={gt|lt|ge|le}[date]{&date={gt|lt|ge|le}[date]&...}

PARAMS [base url] - FHIR base url [reference] - reference to the Patient {system|} - terminology system (LOINC) [code] - observation code (supports OR search) [date] - effective date of observation

HEADERS

The Authorization token SHALL be obtained during Authentication and Authorization process. Goto Authentication and Authorization for further details.

HeaderTypeRequired/OptionalValue
AuthorizationstringrequiredBearer <token>

RESPONSES

CodeDescriptionComment
200OKThe request was processed successfully
400Bad requestInvalid request parameters or FHIR operation outcome resource returned
401UnauthorizedThis code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404no Route matched with those valuesThe request was able to communicate with a given server, but the server could not find what was requested
500Internal Server ErrorThe server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://sandbox.fhir.elationemr.com/fhir/Observation?patient=1137192&code=http://loinc.org|11341-5&date=ge2023-01-01' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'