Skip to content

Goal

Overview

The Goal resource describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.

Each Goal has next elements:

  • a status
  • text description of the goal
  • a patient

Each Goal supports next elements:

  • target date(s):

Must support elements, mandatory and optional search parameters

Goal must support these elements:

  • lifecycleStatus
  • description
  • subject
  • target
    • dueDate

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

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

The syntax used to describe the interactions is described here.

SHALL support searching for all goals for a patient using the patient search parameter:

GET [base url]/Goal?patient={Type/}[id]

The following search parameter combinations SHOULD be supported (optional*):

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

GET [base url]/Goal?patient={Type/}[id]&lifecycle-status={system|}[code]

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

  • including support for these target-date comparators: gt,lt,ge,le
  • including optional support for AND search on target-date (e.g.target-date={date}&target-date={date}&...)
GET [base url]/Goal?patient={Type/}[id]&target-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.

Goal By Patient Id

Search for Goal by patient.

METHOD GET

[base url]/Goal?patient={Type/}[id]

PARAMS

HEADERS

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

Header Type Required/Optional Value
Authorization string required 'Bearer'

RESPONSES

Code Description Comment
200 OK The request was processed successfully
400 Bad request Invalid request parameters or FHIR operation outcome resource returned
401 Unauthorized This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404 no Route matched with those values The request was able to communicate with a given server, but the server could not find what was requested
500 Internal Server Error The server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://demo.kodjin.com/fhir/Goal?patient=Patient/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Goal By Id

Get Goal by ID.

METHOD GET

[base url]/Goal/{id}

or

[base url]/Goal?_id={id}

PARAMS

HEADERS

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

Header Type Required/Optional Value
Authorization string required 'Bearer'

RESPONSES

Code Description Comment
200 OK The request was processed successfully
400 Bad request Invalid request parameters or FHIR operation outcome resource returned
401 Unauthorized This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404 no Route matched with those values The request was able to communicate with a given server, but the server could not find what was requested
500 Internal Server Error The server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://demo.kodjin.com/fhir/Goal/c5137fa5-3216-b12a-cbbc-a0c6bef361g7' \
--header 'Authorization: Bearer fe1cd986-1ac7-4c26-b8b3-d632a48408fd'

Goal by patient and lifecycle-status

Get Goals using the combination of the patient and lifecycle-status search parameters

METHOD GET

GET [base url]/Goal?patient={Type/}[id]&lifecycle-status={system|}[code]`

PARAMS

  • [base url] - FHIR base url
  • {Type/} - Type for the Reference. Example: Patient
  • [id] - patient id
  • {system|} - an identity of the terminology system, used to specify the state of the goal throughout its lifecycle
  • [code] - the state of the goal throughout its lifecycle

HEADERS

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

Header Type Required/Optional Value
Authorization string required 'Bearer'

RESPONSES

Code Description Comment
200 OK The request was processed successfully
400 Bad request Invalid request parameters or FHIR operation outcome resource returned
401 Unauthorized This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404 no Route matched with those values The request was able to communicate with a given server, but the server could not find what was requested
500 Internal Server Error The server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://demo.kodjin.com/fhir/Goal?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&lifecycle-status=active' \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'

Goal by patient and target-date search parameters

Get Goals using the combination of the patient and target-date search parameters

METHOD GET

GET [base url]/Goal?patient={Type/}[id]&target-date={gt|lt|ge|le}[date]`

PARAMS

  • [base url] - FHIR base url
  • {Type/} - Type for the Reference. Example: Patient
  • [id] - patient id
  • [date] - indicates either the date or the duration after start by which the goal should be met.

HEADERS

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

Header Type Required/Optional Value
Authorization string required 'Bearer'

RESPONSES

Code Description Comment
200 OK The request was processed successfully
400 Bad request Invalid request parameters or FHIR operation outcome resource returned
401 Unauthorized This code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource
404 no Route matched with those values The request was able to communicate with a given server, but the server could not find what was requested
500 Internal Server Error The server has encountered a situation it doesn't know how to handle

EXAMPLE:

curl --location --request GET 'https://demo.kodjin.com/fhir/Goal?patient=Patient/fe1cd986-1ac7-4c26-b8b3-d632a48408fd&target-date=ge2015-01-14&target-date=le2019-01-14 \
--header 'Authorization: Bearer 1239b275-909e-4754-8f73-1e411fd6769e'