Skip to content

fhir-gen: extension shorthands #1524

@josephjclark

Description

@josephjclark

We should be able to collapse an extension like this:

 {
      url: 'http://hl7.org/fhir/StructureDefinition/patient-nationality',
      valueCodeableConcept: {
        coding: [
          {
            system: 'urn:iso:std:iso:3166',
            code: 'SWZ',
            display: 'Eswatini',
          },
        ],
        text: 'Eswatini',
      },
    },

Into a simple key value pair like this:

nationality: 'swz'

The IG contains the valuesets needed to generate the appropriate boilerplate. We just need to fit the user value into the slots

By default the generator should create its own keynames for the extensions, based on the profile id. But users should be able to override this in the mappings.js

Also, for each extension shorthand that's generated, we should generate a unit test

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions