Developer documentation‎ > ‎FHIR API‎ > ‎Terminology‎ > ‎

Code Systems

This is a draft document. Please be aware that the contents are subject to change.

Code Systems

When returning a code value in a Coding it is important to identify the namespace ("system") from which that code was drawn. The system is indicated by setting the relevant value into Coding.system.

So what is the relevant value? Well, it depends on where the code value came from.

Externally Defined

FHIR curates a list of officially supported code systems, along with the system value which should be used.

For example, http://snomed.info/sct and http://loinc.org are externally defined code systems.

PKB has no control over the system values defined externally. The URLs used to identify the system are not required to be resolvable, and if they do resolve the content returned is undefined.

Externally Defined, PKB Hosted

PKB allows customers to upload their own code sets for some types of data.

By uploading their own code sets customers can facilitate more meaningful use of their data, such as having PKB map these code values to code values in another coding system, or to apply the customer's choice of privacy label to data points.

These code sets are not currently exposed from the FHIR API.

PKB Defined

There are several data elements which PKB defines our own code set for. For example, the PKB Privacy Labels will be represented as coded security labels in the FHIR metadata.

Each code set that PKB has defined has been given a URL for use in Coding.system throughout the FHIR API.

This URL is not guaranteed to resolve. It is PKB's intention that the URL resolves to helpful documentation whenever possible, but clients should not rely on this.

Clients who wish to obtain a FHIR CodeSystem resource representation of the code set should query PKB's CodeSystem type service, supplying the PKB-defined system parameter as the "url" parameter.

Code SetFHIR System URI Values
Privacy Labelshttp://pkb.io/fhir/CodeSystem/privacy-label
  • GENERAL_HEALTH
  • MENTAL_HEALTH
  • SEXUAL_HEALTH
  • SOCIAL_CARE
Response Codeshttp://pkb.io/fhir/CodeSystem/response-code
  • BAD_AUTHENTICATION
  • ACC_TOKEN_EXPIRED
  • INVALID_API_SESSION
  • USER_TYPE_NOT_PERM
  • NO_ASSOCIATION
  • SHARING_DISABLED
  • NO_DECRYPT_KEY
  • NO_CONSENT








Comments