Skip to content

Instantly share code, notes, and snippets.

@niquola
Last active August 27, 2019 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niquola/aa12d181c12483a95847e7c7e77db489 to your computer and use it in GitHub Desktop.
Save niquola/aa12d181c12483a95847e7c7e77db489 to your computer and use it in GitHub Desktop.
FHIR Profiles

Intro

(FHIR) Profile is responsible for:

  • define extensions
  • bind valuesets
  • set constraints on resource - aka required fields

Aidbox Profiles is "human" way to do it

Principles:

  • No multiple inheretance
  • No closed-profiles

Example

Required fields

resourceType: AidboxProfile
resource: Patient
id: My-Patient-Profile
attrs:
  name: 
     # name is required - for collection means more 1
     isRequired: true
     attrs:
       given: {isRequired: true}
       family: {isRequired: true}

US-COre Profile

name: US-Core Patient
resource: Patient
attrs:
  race:
    id: us-core-race
    url: http://hl7.org/fhir/us/core/StructureDefinition/us-core-race
    desc: US Core Race Extension
    attrs:
      category:
        url: American Indian or Alaska Native|Asian|Black or African American|Native
          Hawaiian or Other Pacific Islander|White
        id: ombCategory
        type: Coding
        valueset:
          url: omb-race-category
          id: race-category
          concepts:
          - code: 1002-5
            display: american indian or alaska native   american indian or alaska
              native
          - code: 2028-9
            display: asian      asian
          - code: 2054-5
            display: black or african american  black or african american
          - code: 2076-8
            display: native hawaiian or other pacific islander  native hawaiian or
              other pacific islander
          - code: 2106-3
            display: white      white
      detailed:
        url: detailed
        type: Coding
        valueset:
          id: race
          concepts: []
      text:
        type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment