@minvws/mgo-fhir
v0.1.1-8
Published
This package contains utility [TypeScript] types for dealing with FHIR models and R3 / R4 versions that are using within [MGO][repo].
Downloads
7
Keywords
Readme
@minvws/mgo-utils
This package contains utility TypeScript types for dealing with FHIR models and R3 / R4 versions that are using within MGO.
Installation
npm i --save @minvws/mgo-fhir
# or
pnpm add @minvws/mgo-fhirUsage
import { type FhirVersion, type ResourceByType, type ResourceType } from '@minvws/mgo-fhir';
type PatientR3R4 = ResourceByType<'Patient'>; // PatientR3 | PatientR4
type PatientR3 = ResourceByType<'Patient', FhirVersion.R3>;
// FhirResourceR3.resourceType | FhirResourceR4.resourceType
const type: ResourceType = 'ProcedureRequest';
// error: "ProcedureRequest" does not exists in FhirResourceR4.resourceType
const type: ResourceType<FhirVersion.R4> = 'ProcedureRequest'; // errorSee the package source for more details
This package and its documentation are still under development.
