From 301035855f5b4792a9928fd725562f9aff8140f0 Mon Sep 17 00:00:00 2001 From: Aleksandr Kislitsyn Date: Mon, 23 Mar 2026 16:15:46 +0100 Subject: [PATCH] Add canonical mapping example (HIS to FHIR) Two architectural approaches for mapping proprietary Hospital Information System data to FHIR R4: a synchronous Redis-cached facade and an event-driven RabbitMQ consumer storing to Aidbox. Includes sample HIS API server, shared test data, generated FHIR types via @atomic-ehr/codegen, and a reusable Claude skill for type generation. Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 1 + .../.claude/skills/generate-types.md | 273 ++ .../aidbox-canonical-mapping/.env.example | 22 + .../aidbox-canonical-mapping/.gitignore | 32 + .../aidbox-canonical-mapping/CLAUDE.md | 48 + .../aidbox-canonical-mapping/Dockerfile | 24 + .../aidbox-canonical-mapping/README.md | 372 +++ .../docker-compose.yaml | 164 ++ .../aidbox-canonical-mapping/package.json | 25 + .../scripts/generate-types.ts | 27 + .../src/event-driven/consumer.ts | 199 ++ .../src/event-driven/fhir-client.ts | 85 + .../src/event-driven/publisher.ts | 180 ++ .../src/facade/cache.ts | 88 + .../src/facade/his-server.ts | 126 + .../src/facade/index.ts | 201 ++ .../src/fhir-types/README.md | 2540 +++++++++++++++++ .../fhir-types/hl7-fhir-r4-core/Address.ts | 32 + .../src/fhir-types/hl7-fhir-r4-core/Age.ts | 11 + .../fhir-types/hl7-fhir-r4-core/Annotation.ts | 20 + .../fhir-types/hl7-fhir-r4-core/Attachment.ts | 27 + .../hl7-fhir-r4-core/BackboneElement.ts | 14 + .../src/fhir-types/hl7-fhir-r4-core/Bundle.ts | 68 + .../hl7-fhir-r4-core/CodeableConcept.ts | 16 + .../src/fhir-types/hl7-fhir-r4-core/Coding.ts | 21 + .../hl7-fhir-r4-core/ContactDetail.ts | 16 + .../hl7-fhir-r4-core/ContactPoint.ts | 22 + .../hl7-fhir-r4-core/Contributor.ts | 18 + .../src/fhir-types/hl7-fhir-r4-core/Count.ts | 11 + .../hl7-fhir-r4-core/DataRequirement.ts | 54 + .../fhir-types/hl7-fhir-r4-core/Distance.ts | 11 + .../hl7-fhir-r4-core/DomainResource.ts | 23 + .../src/fhir-types/hl7-fhir-r4-core/Dosage.ts | 50 + .../fhir-types/hl7-fhir-r4-core/Duration.ts | 11 + .../fhir-types/hl7-fhir-r4-core/Element.ts | 14 + .../fhir-types/hl7-fhir-r4-core/Encounter.ts | 95 + .../fhir-types/hl7-fhir-r4-core/Expression.ts | 21 + .../fhir-types/hl7-fhir-r4-core/Extension.ts | 144 + .../fhir-types/hl7-fhir-r4-core/HumanName.ts | 26 + .../fhir-types/hl7-fhir-r4-core/Identifier.ts | 26 + .../fhir-types/hl7-fhir-r4-core/Location.ts | 66 + .../src/fhir-types/hl7-fhir-r4-core/Meta.ts | 23 + .../src/fhir-types/hl7-fhir-r4-core/Money.ts | 15 + .../fhir-types/hl7-fhir-r4-core/Narrative.ts | 15 + .../hl7-fhir-r4-core/OperationOutcome.ts | 29 + .../hl7-fhir-r4-core/ParameterDefinition.ts | 25 + .../fhir-types/hl7-fhir-r4-core/Patient.ts | 79 + .../src/fhir-types/hl7-fhir-r4-core/Period.ts | 15 + .../fhir-types/hl7-fhir-r4-core/Quantity.ts | 21 + .../src/fhir-types/hl7-fhir-r4-core/Range.ts | 15 + .../src/fhir-types/hl7-fhir-r4-core/Ratio.ts | 15 + .../fhir-types/hl7-fhir-r4-core/Reference.ts | 20 + .../hl7-fhir-r4-core/RelatedArtifact.ts | 26 + .../fhir-types/hl7-fhir-r4-core/Resource.ts | 24 + .../hl7-fhir-r4-core/SampledData.ts | 26 + .../fhir-types/hl7-fhir-r4-core/Signature.ts | 26 + .../src/fhir-types/hl7-fhir-r4-core/Timing.ts | 45 + .../hl7-fhir-r4-core/TriggerDefinition.ts | 31 + .../hl7-fhir-r4-core/UsageContext.ts | 26 + .../src/fhir-types/hl7-fhir-r4-core/index.ts | 49 + .../src/shared/fhir-mapper.ts | 456 +++ .../src/shared/his-client.ts | 150 + .../src/shared/test-data.ts | 220 ++ .../src/shared/types/events.ts | 49 + .../src/shared/types/his.ts | 117 + .../aidbox-canonical-mapping/tsconfig.json | 24 + 66 files changed, 6765 insertions(+) create mode 100644 aidbox-features/aidbox-canonical-mapping/.claude/skills/generate-types.md create mode 100644 aidbox-features/aidbox-canonical-mapping/.env.example create mode 100644 aidbox-features/aidbox-canonical-mapping/.gitignore create mode 100644 aidbox-features/aidbox-canonical-mapping/CLAUDE.md create mode 100644 aidbox-features/aidbox-canonical-mapping/Dockerfile create mode 100644 aidbox-features/aidbox-canonical-mapping/README.md create mode 100644 aidbox-features/aidbox-canonical-mapping/docker-compose.yaml create mode 100644 aidbox-features/aidbox-canonical-mapping/package.json create mode 100644 aidbox-features/aidbox-canonical-mapping/scripts/generate-types.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/event-driven/consumer.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/event-driven/fhir-client.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/event-driven/publisher.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/facade/cache.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/facade/his-server.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/facade/index.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/README.md create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Address.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Age.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Annotation.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Attachment.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/BackboneElement.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Bundle.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/CodeableConcept.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Coding.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactDetail.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactPoint.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Contributor.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Count.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DataRequirement.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Distance.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DomainResource.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Dosage.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Duration.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Element.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Encounter.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Expression.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Extension.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/HumanName.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Identifier.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Location.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Meta.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Money.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Narrative.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/OperationOutcome.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ParameterDefinition.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Patient.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Period.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Quantity.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Range.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Ratio.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Reference.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/RelatedArtifact.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Resource.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/SampledData.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Signature.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Timing.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/TriggerDefinition.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/UsageContext.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/index.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/shared/fhir-mapper.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/shared/his-client.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/shared/test-data.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/shared/types/events.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/src/shared/types/his.ts create mode 100644 aidbox-features/aidbox-canonical-mapping/tsconfig.json diff --git a/README.md b/README.md index be0e7bb..7dbb508 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ A collection of examples on top of Aidbox FHIR platform ## Aidbox Features +- [Canonical Mapping: HIS to FHIR](aidbox-features/aidbox-canonical-mapping/) - [Aidbox Notify via Custom Resources](aidbox-features/aidbox-notify-via-custom-resources/) - [Topic-Based Subscription to Kafka](aidbox-features/aidbox-subscriptions-to-kafka/) - [Aidbox with read-only replica](aidbox-features/aidbox-with-ro-replica/) diff --git a/aidbox-features/aidbox-canonical-mapping/.claude/skills/generate-types.md b/aidbox-features/aidbox-canonical-mapping/.claude/skills/generate-types.md new file mode 100644 index 0000000..49402a9 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/.claude/skills/generate-types.md @@ -0,0 +1,273 @@ +--- +name: generate-types +description: Generate or update FHIR TypeScript types using @atomic-ehr/codegen with tree-shaking +--- + +# FHIR Type Generation with @atomic-ehr/codegen + +Generate type-safe FHIR R4 TypeScript interfaces from StructureDefinitions. Uses tree-shaking to only include the resource types you need. + +## Setup (if not already configured) + +### 1. Install the codegen package + +```sh +# npm +npm install -D @atomic-ehr/codegen + +# pnpm +pnpm add -D @atomic-ehr/codegen + +# yarn +yarn add -D @atomic-ehr/codegen + +# bun +bun add -d @atomic-ehr/codegen +``` + +For npm/pnpm/yarn projects, also install `tsx` to run the TypeScript generation script: + +```sh +npm install -D tsx +``` + +### 2. Create the generation script + +Create `scripts/generate-types.ts`: + +```ts +import { APIBuilder, prettyReport } from "@atomic-ehr/codegen"; + +const builder = new APIBuilder() + .throwException() + .fromPackage("hl7.fhir.r4.core", "4.0.1") + .typescript({ + withDebugComment: false, + generateProfile: false, + openResourceTypeSet: false, + }) + .typeSchema({ + treeShake: { + "hl7.fhir.r4.core": { + // Add the resource types you need here. + // All dependency types (Identifier, Reference, CodeableConcept, etc.) + // are included automatically. + "http://hl7.org/fhir/StructureDefinition/Patient": {}, + "http://hl7.org/fhir/StructureDefinition/Bundle": {}, + "http://hl7.org/fhir/StructureDefinition/OperationOutcome": {}, + }, + }, + }) + .outputTo("./src/fhir-types") + .cleanOutput(true); + +const report = await builder.generate(); +console.log(prettyReport(report)); +if (!report.success) process.exit(1); +``` + +### 3. Add the script to package.json + +```json +{ + "scripts": { + "generate-types": "bun run scripts/generate-types.ts" + } +} +``` + +For npm/pnpm/yarn projects (using tsx instead of bun): + +```json +{ + "scripts": { + "generate-types": "tsx scripts/generate-types.ts" + } +} +``` + +### 4. Add to .gitignore + +``` +.codegen-cache/ +``` + +### 5. Include scripts in tsconfig.json + +```json +{ + "include": ["src/**/*", "scripts/**/*"] +} +``` + +### 6. Run generation + +```sh +# bun +bun run generate-types + +# npm +npm run generate-types + +# pnpm +pnpm run generate-types +``` + +This outputs typed interfaces to `src/fhir-types/hl7-fhir-r4-core/`. Commit these files — they are the project's FHIR type definitions. + +## APIBuilder reference + +### Loading FHIR packages + +```ts +// FHIR R4 base (required) +.fromPackage("hl7.fhir.r4.core", "4.0.1") + +// Implementation Guides (optional) — load from tgz URL +.fromPackageRef("https://fs.get-ig.org/-/hl7.fhir.us.core-7.0.0.tgz") +.fromPackageRef("https://fs.get-ig.org/-/fhir.r4.ukcore.stu2-2.0.2.tgz") +``` + +### TypeScript options + +```ts +.typescript({ + withDebugComment: false, // omit debug comments in generated files + generateProfile: false, // set true when loading IGs with constrained profiles + openResourceTypeSet: false, // stricter resource type unions +}) +``` + +### Tree-shaking + +Tree-shaking controls which resource types are generated. Without it, ALL FHIR resources are included (~150+ files). With it, only the listed types and their transitive dependencies are generated. + +```ts +.typeSchema({ + treeShake: { + "": { + "": {}, + // ... + }, + }, +}) +``` + +**StructureDefinition URL patterns:** + +| Source | Pattern | Example | +|--------|---------|---------| +| FHIR R4 base | `http://hl7.org/fhir/StructureDefinition/{ResourceType}` | `http://hl7.org/fhir/StructureDefinition/Patient` | +| US Core | `http://hl7.org/fhir/us/core/StructureDefinition/{profile}` | `http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient` | +| UK Core | `https://fhir.hl7.org.uk/StructureDefinition/{profile}` | `https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient` | + +**Common FHIR R4 resource types:** + +```ts +"http://hl7.org/fhir/StructureDefinition/Patient": {}, +"http://hl7.org/fhir/StructureDefinition/Encounter": {}, +"http://hl7.org/fhir/StructureDefinition/Observation": {}, +"http://hl7.org/fhir/StructureDefinition/Condition": {}, +"http://hl7.org/fhir/StructureDefinition/Procedure": {}, +"http://hl7.org/fhir/StructureDefinition/MedicationRequest": {}, +"http://hl7.org/fhir/StructureDefinition/DiagnosticReport": {}, +"http://hl7.org/fhir/StructureDefinition/AllergyIntolerance": {}, +"http://hl7.org/fhir/StructureDefinition/Immunization": {}, +"http://hl7.org/fhir/StructureDefinition/Location": {}, +"http://hl7.org/fhir/StructureDefinition/Organization": {}, +"http://hl7.org/fhir/StructureDefinition/Practitioner": {}, +"http://hl7.org/fhir/StructureDefinition/Bundle": {}, +"http://hl7.org/fhir/StructureDefinition/OperationOutcome": {}, +"http://hl7.org/fhir/StructureDefinition/Questionnaire": {}, +"http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse": {}, +``` + +### Output options + +```ts +.outputTo("./src/fhir-types") // output directory +.cleanOutput(true) // delete output dir before regenerating +``` + +## Example: Adding an Implementation Guide + +To generate US Core profiled types alongside base R4: + +```ts +import { APIBuilder, prettyReport } from "@atomic-ehr/codegen"; + +const builder = new APIBuilder() + .throwException() + .fromPackage("hl7.fhir.r4.core", "4.0.1") + .fromPackageRef("https://fs.get-ig.org/-/hl7.fhir.us.core-7.0.0.tgz") + .typescript({ + withDebugComment: false, + generateProfile: true, // enable for IG profiles + openResourceTypeSet: false, + }) + .typeSchema({ + treeShake: { + "hl7.fhir.r4.core": { + "http://hl7.org/fhir/StructureDefinition/Bundle": {}, + "http://hl7.org/fhir/StructureDefinition/OperationOutcome": {}, + }, + "hl7.fhir.us.core": { + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient": {}, + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-encounter-diagnosis": {}, + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab": {}, + }, + }, + }) + .outputTo("./src/fhir-types") + .cleanOutput(true); + +const report = await builder.generate(); +console.log(prettyReport(report)); +if (!report.success) process.exit(1); +``` + +## What gets generated + +For each resource type, a `.ts` file is generated containing: + +- **Main interface** — e.g., `Patient`, `Encounter`, `Bundle` +- **BackboneElement interfaces** — nested structures like `EncounterLocation`, `PatientContact`, `BundleEntry` +- **Type guard function** — e.g., `isPatient(resource)`, `isEncounter(resource)` +- **Re-exports** of dependency types (Identifier, Reference, CodeableConcept, etc.) +- **Barrel export** — `index.ts` re-exports everything for convenience + +Generated types are fully typed with FHIR value set enums where applicable: + +```ts +// Encounter.status is a union of valid FHIR values +status: ("planned" | "arrived" | "triaged" | "in-progress" | "onleave" | "finished" | "cancelled" | "entered-in-error" | "unknown"); + +// References are typed with target resource types +subject?: Reference<"Group" | "Patient">; +location: Reference<"Location">; +``` + +## Import patterns + +```ts +// Direct file import (preferred — explicit about what you use) +import type { Patient } from "./fhir-types/hl7-fhir-r4-core/Patient"; +import type { Encounter, EncounterLocation } from "./fhir-types/hl7-fhir-r4-core/Encounter"; +import type { Bundle, BundleEntry } from "./fhir-types/hl7-fhir-r4-core/Bundle"; +import type { Identifier } from "./fhir-types/hl7-fhir-r4-core/Identifier"; +import type { Reference } from "./fhir-types/hl7-fhir-r4-core/Reference"; + +// Barrel import (convenient for grabbing many types) +import type { Patient, Encounter, Location, Bundle } from "./fhir-types/hl7-fhir-r4-core"; + +// Type guards (value imports, not type-only) +import { isPatient, isEncounter } from "./fhir-types/hl7-fhir-r4-core"; +``` + +## Workflow for adding a new resource type + +1. Edit `scripts/generate-types.ts` — add the StructureDefinition URL to `treeShake` +2. Run `npm run generate-types` (or `bun run generate-types`, `pnpm run generate-types`) +3. Import the new type in your code +4. Run typecheck to verify +5. Commit the updated `src/fhir-types/` directory diff --git a/aidbox-features/aidbox-canonical-mapping/.env.example b/aidbox-features/aidbox-canonical-mapping/.env.example new file mode 100644 index 0000000..fa721e5 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/.env.example @@ -0,0 +1,22 @@ +# FHIR Facade Configuration + +# Server +PORT=3000 +CACHE_TTL_SECONDS=60 +REDIS_URL=redis://redis:6379 + +# HIS (Hospital Information System) API +HIS_BASE_URL=http://his:4000 +HIS_CLIENT_ID=his-client +HIS_CLIENT_SECRET=his-secret +HIS_ENVIRONMENT=TEST + +# Requesting Product header value +REQUESTING_PRODUCT=FHIR-Facade/1.0.0 + +# Event-Driven Architecture +RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672 +FHIR_SERVER_URL=http://aidbox:8080 +AIDBOX_CLIENT_ID=root +AIDBOX_CLIENT_SECRET=WdodyB65ij +PREFETCH=10 diff --git a/aidbox-features/aidbox-canonical-mapping/.gitignore b/aidbox-features/aidbox-canonical-mapping/.gitignore new file mode 100644 index 0000000..3664b4b --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/.gitignore @@ -0,0 +1,32 @@ +# Dependencies +node_modules/ + +# Environment +.env +.env.local +.env.*.local + +# Build +dist/ +*.tsbuildinfo + +# IDE +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* + +# Bun +bun.lock + +# Codegen +.codegen-cache/ diff --git a/aidbox-features/aidbox-canonical-mapping/CLAUDE.md b/aidbox-features/aidbox-canonical-mapping/CLAUDE.md new file mode 100644 index 0000000..292f6a4 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/CLAUDE.md @@ -0,0 +1,48 @@ +# CLAUDE.md + +## Project Overview + +This project demonstrates canonical mapping — translating proprietary Hospital Information System (HIS) data into FHIR R4 resources. It shows two architectural approaches: + +1. **Pure Facade** (synchronous) — Redis-cached proxy that fetches from HIS API on demand +2. **Event-Driven** — RabbitMQ consumer that maps ADT events to FHIR and stores in Aidbox + +## FHIR Type Generation + +FHIR TypeScript types are generated using `@atomic-ehr/codegen`. The config is at `scripts/generate-types.ts` with tree-shaking for Patient, Encounter, Location, Bundle, and OperationOutcome. + +Generated types are output to `src/fhir-types/hl7-fhir-r4-core/` — do not edit these files manually. + +```ts +import type { Patient } from "./fhir-types/hl7-fhir-r4-core/Patient"; +import type { Encounter, EncounterLocation } from "./fhir-types/hl7-fhir-r4-core/Encounter"; +import type { Bundle, BundleEntry } from "./fhir-types/hl7-fhir-r4-core/Bundle"; +``` + +To add a new resource type, add its StructureDefinition URL to the `treeShake` config and run `bun run generate-types`. + +## Commands + +| Command | Description | +|---------|-------------| +| `bun run generate-types` | Regenerate FHIR TypeScript types | +| `bun run typecheck` | TypeScript type check | +| `bun run dev` | Start facade with hot reload | +| `bun run start:consumer` | Start event consumer | +| `bun run publish:admit` | Publish 7 test admit events | +| `docker compose --profile facade up -d --build` | Run facade approach | +| `docker compose --profile event-driven up -d --build` | Run event-driven approach | + +## Project Structure + +- `src/facade/index.ts` — FHIR facade HTTP server (Bun.serve) +- `src/facade/cache.ts` — Redis TTL cache +- `src/facade/his-server.ts` — Sample HIS API server +- `src/event-driven/consumer.ts` — RabbitMQ ADT event consumer +- `src/event-driven/publisher.ts` — ADT event simulator +- `src/event-driven/fhir-client.ts` — Aidbox FHIR client +- `src/shared/his-client.ts` — HIS API client (OAuth 2.0) +- `src/shared/fhir-mapper.ts` — HIS → FHIR R4 mapping functions +- `src/shared/test-data.ts` — Shared test data (7 sample patients) +- `src/fhir-types/` — Auto-generated FHIR types (do not edit) +- `scripts/generate-types.ts` — Codegen configuration diff --git a/aidbox-features/aidbox-canonical-mapping/Dockerfile b/aidbox-features/aidbox-canonical-mapping/Dockerfile new file mode 100644 index 0000000..02a0ad0 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/Dockerfile @@ -0,0 +1,24 @@ +FROM oven/bun:1 AS base +WORKDIR /app + +# Install dependencies +FROM base AS install +COPY package.json bun.lock* ./ +RUN bun install --frozen-lockfile || bun install + +# Production stage +FROM base AS release +COPY --from=install /app/node_modules node_modules +COPY src ./src +COPY package.json . + +# Entry point (can be overridden via build arg) +ARG ENTRY_POINT=src/facade/index.ts +ENV ENTRY_POINT=$ENTRY_POINT + +# Run as non-root user +USER bun + +EXPOSE 3000 + +CMD ["sh", "-c", "bun run $ENTRY_POINT"] diff --git a/aidbox-features/aidbox-canonical-mapping/README.md b/aidbox-features/aidbox-canonical-mapping/README.md new file mode 100644 index 0000000..b98327e --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/README.md @@ -0,0 +1,372 @@ +--- +features: [Canonical Mapping, FHIR Facade, FHIR Search] +languages: [TypeScript] +--- + +# Canonical Mapping: HIS to FHIR + +Two architectural approaches for exposing proprietary Hospital Information System (HIS) data as FHIR R4. + +## Problem + +Hospital Information Systems use proprietary APIs and data formats. Modern healthcare applications expect data in **FHIR R4** — the international standard for healthcare data exchange. + +This example demonstrates how to build a **canonical mapping layer** that translates proprietary HIS data into FHIR resources (Patient, Encounter, Location). + +### Context + +A typical scenario: a hospital has hundreds of wards, each with dozens of bedside terminals or dashboards that display current ward occupancy. These terminals poll for updated patient data every 30–60 seconds. The underlying HIS exposes this data through a proprietary API — but the consuming applications expect FHIR. + +### Requirements + +1. **Protocol Translation**: Expose HIS data as FHIR R4 resources (Patient, Encounter, Location) +2. **Efficient Data Access**: Many clients poll for the same ward data every ~60 seconds; the solution must avoid flooding the HIS with redundant API calls + +## Two Solutions + +### 1. Pure Facade (Synchronous) + +```mermaid +graph LR + subgraph "Clients" + T1(Client 1):::blue + T2(Client 2):::blue + TN(Client N):::blue + end + + subgraph "FHIR Facade" + F1(Facade 1):::green + F2(Facade 2):::green + R[(Redis
TTL 60s)]:::yellow + end + + T1 -->|"/fhir/$get-ward-patients"| F1 + T2 -->|"/fhir/$get-ward-patients"| F2 + TN -->|"/fhir/$get-ward-patients"| F1 + + F1 <--> R + F2 <--> R + F1 -->|HIS API| M(HIS):::orange + F2 -->|HIS API| M + + classDef blue fill:#e1f5fe,stroke:#01579b + classDef green fill:#e8f5e9,stroke:#2e7d32 + classDef yellow fill:#fff9c4,stroke:#f9a825 + classDef orange fill:#fff3e0,stroke:#ef6c00 +``` + +**Flow:** + +1. Client requests `GET /fhir/$get-ward-patients?ward-id={wardId}` +2. Facade checks Redis cache (TTL 60s) +3. On cache miss: fetch from HIS → map to FHIR → cache → return +4. On cache hit: return cached Bundle + +**Response:** FHIR Bundle (type: collection) containing: +- `Location` — the ward +- `Patient` — patients currently in the ward +- `Encounter` — active inpatient encounters linking Patient to Location + +**Why Cache?** + +Without cache, every terminal request triggers HIS API calls. If a ward has 50 terminals all refreshing every 60 seconds, the same data is fetched 50 times per minute. A shared Redis cache (TTL 60s) ensures one HIS call serves all terminals for that ward. + +**Why Redis (not in-memory)?** + +In production, the facade runs as multiple replicas behind a load balancer. With in-memory cache, each replica caches independently — redundant HIS calls. Redis provides a single shared cache for all replicas. + +### 2. Event-Driven Architecture + +```mermaid +graph LR + subgraph "Event Flow" + M(HIS):::orange -->|ADT Event| Q[(RabbitMQ)]:::violet + Q --> C(Consumer):::green + C -->|"PUT /fhir/Patient, /fhir/Encounter"| FS[(Aidbox)]:::cyan + end + + subgraph "Clients" + T1(Client 1):::blue + T2(Client 2):::blue + end + + T1 -->|"GET /fhir/Encounter?..."| FS + T2 -->|"GET /fhir/Encounter?..."| FS + + classDef blue fill:#e1f5fe,stroke:#01579b + classDef green fill:#e8f5e9,stroke:#2e7d32 + classDef orange fill:#fff3e0,stroke:#ef6c00 + classDef violet fill:#f3e5f5,stroke:#7b1fa2 + classDef cyan fill:#e0f7fa,stroke:#00838f +``` + +**ADT Events** (Admission, Discharge, Transfer) — HIS publishes full patient data when status changes. + +**Flow:** + +1. HIS publishes ADT event with full patient/encounter data to RabbitMQ +2. Consumer maps data to FHIR, stores in Aidbox +3. Clients query Aidbox directly via **standard FHIR search**: + ``` + GET /fhir/Encounter?location=Location/{wardId}&status=in-progress,arrived + &_include=Encounter:subject + &_include=Encounter:location + ``` + +**Why No Cache?** Aidbox **is** the cache. Data is pre-populated by consumer on ADT events. Clients read from Aidbox, never triggering HIS API calls. + +## Quick Start + +### Prerequisites + +- Docker and Docker Compose + +### Approach 1: Pure Facade + +```bash +docker compose --profile facade up -d --build +``` + +Services: +- **his** — http://localhost:4000 (sample HIS API with 7 patients) +- **redis** — localhost:6379 +- **facade** — http://localhost:3000 + +**Test:** + +```bash +curl "http://localhost:3000/fhir/\$get-ward-patients?ward-id=ward-001" +``` + +Returns FHIR Bundle containing: +- **N x Encounter** — active inpatient encounters +- **N x Patient** — patients referenced by encounters +- **1 x Location** — the ward + +**Stop:** + +```bash +docker compose --profile facade down +``` + +### Approach 2: Event-Driven + +1. Start the services: + +```bash +docker compose --profile event-driven up -d --build +``` + +2. Initialize Aidbox: + - Open http://localhost:8080 in your browser + - Log in and initialize the instance with your Aidbox account + +Services: +- **rabbitmq** — http://localhost:15672 (Management UI, guest/guest) +- **aidbox** — http://localhost:8080 (FHIR R4 server) +- **consumer** — ADT event consumer + +**Test:** + +The HIS publishes ADT events with full patient data. Use `publisher.ts` to simulate 7 patient admissions: + +```mermaid +sequenceDiagram + participant P as publisher.ts + participant Q as RabbitMQ + participant C as Consumer + participant A as Aidbox + + P->>Q: 7 x ADT admit events + Q->>C: Deliver events + C->>C: Map to FHIR + C->>A: PUT /fhir/Patient (x7) + C->>A: PUT /fhir/Encounter (x7) + C->>A: PUT /fhir/Location (x1) +``` + +```bash +# 1. Simulate 7 ADT "admit" events +docker compose --profile event-driven run --rm consumer bun run src/event-driven/publisher.ts admit + +# 2. Query Aidbox (standard FHIR search with _include) +curl -u root:WdodyB65ij "http://localhost:8080/fhir/Encounter?location=Location/ward-001&status=in-progress,arrived&_include=Encounter:subject&_include=Encounter:location" +``` + +Returns FHIR Bundle containing: +- **7 x Encounter** (match) — active inpatient encounters +- **7 x Patient** (include) — patients referenced by encounters +- **1 x Location** (include) — the ward + +**Stop:** + +```bash +docker compose --profile event-driven down +``` + +## Configuration + +| Variable | Default | Description | +| -------------------- | ------------------------------- | ----------------------- | +| `PORT` | 3000 | Facade server port | +| `CACHE_TTL_SECONDS` | 60 | Cache TTL in seconds | +| `REDIS_URL` | redis://redis:6379 | Redis URL | +| `HIS_BASE_URL` | http://his:4000 | HIS API base URL | +| `HIS_CLIENT_ID` | his-client | OAuth Client ID | +| `HIS_CLIENT_SECRET` | his-secret | OAuth Client Secret | +| `HIS_ENVIRONMENT` | TEST | HIS environment | +| `RABBITMQ_URL` | amqp://guest:guest@rabbitmq:5672| RabbitMQ URL | +| `FHIR_SERVER_URL` | http://aidbox:8080 | Aidbox URL | +| `AIDBOX_CLIENT_ID` | root | Aidbox client ID | +| `AIDBOX_CLIENT_SECRET`| WdodyB65ij | Aidbox client secret | +| `PREFETCH` | 10 | Consumer prefetch count | + +## FHIR Mapping + +### Patient Mapping + +| HIS Field | FHIR Patient Field | Notes | +| -------------------------- | ---------------------- | --------------------------------------------- | +| `patientId` | `id`, `identifier[0]` | System: `https://his.example.com/patient-id` | +| `nationalIdentifier.value` | `identifier[]` | System: `https://national-registry.example.com/patient-id` | +| `localIdentifier.value` | `identifier[]` | System: `https://his.example.com/local-id` | +| `title.description` | `name[0].prefix[]` | | +| `forename` | `name[0].given[0]` | | +| `surname` | `name[0].family` | | +| `gender.description` | `gender` | Mapped: Male->male, Female->female | +| `doB` | `birthDate` | Format: YYYY-MM-DD | + +### Encounter Mapping + +| HIS Field | FHIR Encounter Field | Notes | +| ---------------- | --------------------------- | ---------------------------------------- | +| `spellId` | `id`, `identifier[0]` | System: `https://his.example.com/spell-id`| +| `patientId` | `subject.reference` | `Patient/{patientId}` | +| `admissionDate` | `period.start` | | +| `status` | `status` | Mapped: discharge->finished, etc. | +| `wardId` | `location[0].location.reference` | `Location/{wardId}` | +| `bedName` | `location[0].physicalType.text` | Bed identifier | +| `specialtyCode` | `serviceType.coding[0].code` | | +| — | `class.code` | Fixed: `IMP` (inpatient) | + +### Location Mapping + +| HIS Field | FHIR Location Field | Notes | +| ---------- | ------------------- | ----------------------------------------- | +| `wardId` | `id`, `identifier[0]`| System: `https://his.example.com/ward-id` | +| `wardName` | `name` | | +| `siteName` | `description` | Combined: "{wardName} at {siteName}" | +| — | `physicalType` | Fixed: `wa` (Ward) | + +## ADT Event Schema + +Events contain full patient and encounter data (fat event pattern): + +```json +{ + "eventType": "ADT", + "action": "admit", + "timestamp": "2024-01-15T10:30:00Z", + "patient": { + "patientId": "patient-001", + "nationalId": "NAT-9000001", + "localId": "H100001", + "title": "Mr", + "forename": "James", + "surname": "Wilson", + "gender": "Male", + "birthDate": "1990-01-15" + }, + "encounter": { + "spellId": "spell-001", + "wardId": "ward-001", + "wardName": "Ward 04", + "siteName": "General Hospital", + "bedName": "B05", + "admissionDate": "2024-12-01T15:52:00Z", + "specialtyCode": "100", + "specialtyName": "General Surgery" + } +} +``` + +## Trade-offs + +| Aspect | Pure Facade | Event-Driven | +| -------------- | ------------------------- | ------------------------- | +| Complexity | Simpler | More complex | +| Infrastructure | Redis | RabbitMQ + Aidbox + PG | +| Data freshness | Cached (60s TTL) | Real-time | +| HIS load | On cache miss | Only publishes events | +| Scalability | Horizontal (shared cache) | Horizontal (Aidbox + PG) | + +## Project Structure + +``` +scripts/ +└── generate-types.ts # FHIR type generation config +src/ +├── facade/ # Approach 1: Pure Facade +│ ├── index.ts # HTTP server (Bun.serve) +│ ├── cache.ts # Redis TTL cache +│ └── his-server.ts # Sample HIS API server +│ +├── event-driven/ # Approach 2: Event-Driven +│ ├── consumer.ts # RabbitMQ consumer +│ ├── publisher.ts # ADT event simulator (testing) +│ └── fhir-client.ts # Aidbox FHIR client +│ +├── shared/ # Shared code +│ ├── his-client.ts # HIS API client + OAuth 2.0 +│ ├── fhir-mapper.ts # HIS → FHIR R4 mapping +│ ├── test-data.ts # Shared test data (7 sample patients) +│ └── types/ +│ ├── his.ts # HIS API types +│ └── events.ts # ADT event types +│ +└── fhir-types/ # Generated FHIR R4 types (do not edit) + └── hl7-fhir-r4-core/ # Patient, Encounter, Location, Bundle, etc. +``` + +## Local Development + +```bash +# Install dependencies +bun install + +# Regenerate FHIR types (Patient, Encounter, Location, Bundle, OperationOutcome) +bun run generate-types + +# Run facade service locally +bun run src/facade/index.ts + +# Run type check +bun run typecheck + +# Simulate ADT events (requires RabbitMQ on localhost:5672) +bun run publish:admit # 7 admit events +bun run publish:discharge # 7 discharge events +bun run publish:transfer # 7 transfer events +``` + +## FHIR Type Generation + +FHIR TypeScript types are generated using [@atomic-ehr/codegen](https://github.com/nicola-ehr/codegen). The generation script at `scripts/generate-types.ts` uses tree-shaking to include only the resource types used in this example: + +- **Patient** — mapped from HIS patient data +- **Encounter** — mapped from HIS inpatient/ADT data +- **Location** — mapped from HIS ward data +- **Bundle** — response format for `$get-ward-patients` and FHIR search +- **OperationOutcome** — error responses + +To regenerate types (e.g., after adding new resource types to the config): + +```bash +bun run generate-types +``` + +## Dependencies + +- [ioredis](https://github.com/redis/ioredis) — Redis client for facade caching +- [amqplib](https://github.com/amqp-node/amqplib) — RabbitMQ client for event-driven architecture +- [@atomic-ehr/codegen](https://github.com/nicola-ehr/codegen) — FHIR type generation (dev dependency) diff --git a/aidbox-features/aidbox-canonical-mapping/docker-compose.yaml b/aidbox-features/aidbox-canonical-mapping/docker-compose.yaml new file mode 100644 index 0000000..ac1b493 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/docker-compose.yaml @@ -0,0 +1,164 @@ +volumes: + postgres_data: {} + +services: + # ============ Approach 1: Pure Facade ============ + + his: + build: + context: . + dockerfile: Dockerfile + args: + ENTRY_POINT: src/facade/his-server.ts + profiles: [facade] + ports: + - "4000:4000" + environment: + - PORT=4000 + healthcheck: + test: ["CMD", "bun", "-e", "fetch('http://localhost:4000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"] + interval: 5s + timeout: 3s + retries: 5 + + redis: + image: redis:7-alpine + profiles: [facade] + ports: + - "6379:6379" + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 5 + + facade: + build: + context: . + dockerfile: Dockerfile + args: + ENTRY_POINT: src/facade/index.ts + profiles: [facade] + ports: + - "3000:3000" + environment: + - PORT=3000 + - CACHE_TTL_SECONDS=60 + - REDIS_URL=redis://redis:6379 + - HIS_BASE_URL=http://his:4000 + - HIS_CLIENT_ID=his-client + - HIS_CLIENT_SECRET=his-secret + - HIS_ENVIRONMENT=TEST + - REQUESTING_PRODUCT=FHIR-Facade/1.0.0 + depends_on: + redis: + condition: service_healthy + his: + condition: service_healthy + restart: unless-stopped + healthcheck: + test: ["CMD", "bun", "-e", "fetch('http://localhost:3000/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"] + interval: 30s + timeout: 10s + retries: 3 + + # ============ Approach 2: Event-Driven ============ + + rabbitmq: + image: rabbitmq:4-management + profiles: [event-driven] + ports: + - "5672:5672" + - "15672:15672" + environment: + - RABBITMQ_DEFAULT_USER=guest + - RABBITMQ_DEFAULT_PASS=guest + healthcheck: + test: rabbitmq-diagnostics -q ping + interval: 10s + timeout: 5s + retries: 5 + + postgres: + image: docker.io/library/postgres:18 + profiles: [event-driven] + volumes: + - postgres_data:/var/lib/postgresql/18/docker:delegated + command: + - postgres + - -c + - shared_preload_libraries=pg_stat_statements + environment: + POSTGRES_USER: aidbox + POSTGRES_PORT: "5432" + POSTGRES_DB: aidbox + POSTGRES_PASSWORD: aKzqYZGsjV + healthcheck: + test: ["CMD-SHELL", "pg_isready -U aidbox"] + interval: 5s + timeout: 3s + retries: 5 + + aidbox: + image: docker.io/healthsamurai/aidboxone:edge + profiles: [event-driven] + pull_policy: always + depends_on: + postgres: + condition: service_healthy + ports: + - 8080:8080 + environment: + BOX_ADMIN_PASSWORD: O1yLBrsy84 + BOX_BOOTSTRAP_FHIR_PACKAGES: hl7.fhir.r4.core#4.0.1 + BOX_COMPATIBILITY_VALIDATION_JSON__SCHEMA_REGEX: "#{:fhir-datetime}" + BOX_DB_DATABASE: aidbox + BOX_DB_HOST: postgres + BOX_DB_PASSWORD: aKzqYZGsjV + BOX_DB_PORT: "5432" + BOX_DB_USER: aidbox + BOX_FHIR_BUNDLE_EXECUTION_VALIDATION_MODE: limited + BOX_FHIR_COMPLIANT_MODE: "true" + BOX_FHIR_CORRECT_AIDBOX_FORMAT: "true" + BOX_FHIR_CREATEDAT_URL: https://aidbox.app/ex/createdAt + BOX_FHIR_SCHEMA_VALIDATION: "true" + BOX_FHIR_SEARCH_AUTHORIZE_INLINE_REQUESTS: "true" + BOX_FHIR_SEARCH_CHAIN_SUBSELECT: "true" + BOX_FHIR_SEARCH_COMPARISONS: "true" + BOX_FHIR_TERMINOLOGY_ENGINE: hybrid + BOX_FHIR_TERMINOLOGY_ENGINE_HYBRID_EXTERNAL_TX_SERVER: https://tx.health-samurai.io/fhir + BOX_FHIR_TERMINOLOGY_SERVICE_BASE_URL: https://tx.health-samurai.io/fhir + BOX_MODULE_SDC_STRICT_ACCESS_CONTROL: "true" + BOX_ROOT_CLIENT_SECRET: WdodyB65ij + BOX_SEARCH_INCLUDE_CONFORMANT: "true" + BOX_SECURITY_AUDIT_LOG_ENABLED: "true" + BOX_SECURITY_DEV_MODE: "true" + BOX_SETTINGS_MODE: read-write + BOX_WEB_BASE_URL: http://localhost:8080 + BOX_WEB_PORT: 8080 + healthcheck: + test: curl -f http://localhost:8080/health || exit 1 + interval: 5s + timeout: 5s + retries: 90 + start_period: 30s + + consumer: + build: + context: . + dockerfile: Dockerfile + args: + ENTRY_POINT: src/event-driven/consumer.ts + profiles: [event-driven] + environment: + - RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672 + - FHIR_SERVER_URL=http://aidbox:8080 + - AIDBOX_CLIENT_ID=root + - AIDBOX_CLIENT_SECRET=WdodyB65ij + - PREFETCH=10 + depends_on: + rabbitmq: + condition: service_healthy + aidbox: + condition: service_healthy + restart: unless-stopped diff --git a/aidbox-features/aidbox-canonical-mapping/package.json b/aidbox-features/aidbox-canonical-mapping/package.json new file mode 100644 index 0000000..3f6ceba --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/package.json @@ -0,0 +1,25 @@ +{ + "name": "aidbox-canonical-mapping", + "version": "1.0.0", + "type": "module", + "scripts": { + "start": "bun run src/facade/index.ts", + "start:consumer": "bun run src/event-driven/consumer.ts", + "dev": "bun run --watch src/facade/index.ts", + "typecheck": "tsc --noEmit", + "generate-types": "bun run scripts/generate-types.ts", + "publish:admit": "RABBITMQ_URL=amqp://guest:guest@localhost:5672 bun run src/event-driven/publisher.ts admit", + "publish:discharge": "RABBITMQ_URL=amqp://guest:guest@localhost:5672 bun run src/event-driven/publisher.ts discharge", + "publish:transfer": "RABBITMQ_URL=amqp://guest:guest@localhost:5672 bun run src/event-driven/publisher.ts transfer" + }, + "dependencies": { + "amqplib": "^0.10.9", + "ioredis": "^5.9.2" + }, + "devDependencies": { + "@atomic-ehr/codegen": "^0.0.7", + "@types/amqplib": "^0.10.8", + "@types/bun": "^1.2.0", + "typescript": "^5.7.0" + } +} diff --git a/aidbox-features/aidbox-canonical-mapping/scripts/generate-types.ts b/aidbox-features/aidbox-canonical-mapping/scripts/generate-types.ts new file mode 100644 index 0000000..dff211d --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/scripts/generate-types.ts @@ -0,0 +1,27 @@ +import { APIBuilder, prettyReport } from "@atomic-ehr/codegen"; + +const builder = new APIBuilder() + .throwException() + .fromPackage("hl7.fhir.r4.core", "4.0.1") + .typescript({ + withDebugComment: false, + generateProfile: false, + openResourceTypeSet: false, + }) + .typeSchema({ + treeShake: { + "hl7.fhir.r4.core": { + "http://hl7.org/fhir/StructureDefinition/Patient": {}, + "http://hl7.org/fhir/StructureDefinition/Encounter": {}, + "http://hl7.org/fhir/StructureDefinition/Location": {}, + "http://hl7.org/fhir/StructureDefinition/Bundle": {}, + "http://hl7.org/fhir/StructureDefinition/OperationOutcome": {}, + }, + }, + }) + .outputTo("./src/fhir-types") + .cleanOutput(true); + +const report = await builder.generate(); +console.log(prettyReport(report)); +if (!report.success) process.exit(1); diff --git a/aidbox-features/aidbox-canonical-mapping/src/event-driven/consumer.ts b/aidbox-features/aidbox-canonical-mapping/src/event-driven/consumer.ts new file mode 100644 index 0000000..8d084a2 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/event-driven/consumer.ts @@ -0,0 +1,199 @@ +/** + * RabbitMQ Event Consumer + * Consumes ADT fat events, maps to FHIR, stores in Aidbox + * No HIS API calls needed — all data comes from the event + */ + +import * as amqp from "amqplib"; +import { mapPatientFromEvent, mapEncounterFromEvent, mapLocation } from "../shared/fhir-mapper"; +import { createFhirClient, FhirClient } from "./fhir-client"; +import type { ADTEvent, EventEnvelope } from "../shared/types/events"; + +const QUEUE_NAME = "adt-events"; +const EXCHANGE_NAME = "his-events"; +const ROUTING_KEY = "adt.#"; + +interface ConsumerConfig { + rabbitmqUrl: string; + prefetch: number; +} + +type AmqpConnection = Awaited>; +type AmqpChannel = Awaited>; + +class EventConsumer { + private config: ConsumerConfig; + private fhirClient: FhirClient; + private connection: AmqpConnection | null = null; + private channel: AmqpChannel | null = null; + + constructor(config: ConsumerConfig, fhirClient: FhirClient) { + this.config = config; + this.fhirClient = fhirClient; + } + + async connect(): Promise { + console.log(`[Consumer] Connecting to RabbitMQ: ${this.config.rabbitmqUrl}`); + + this.connection = await amqp.connect(this.config.rabbitmqUrl); + this.channel = await this.connection.createChannel(); + + await this.channel.prefetch(this.config.prefetch); + await this.channel.assertExchange(EXCHANGE_NAME, "topic", { durable: true }); + await this.channel.assertQueue(QUEUE_NAME, { durable: true }); + await this.channel.bindQueue(QUEUE_NAME, EXCHANGE_NAME, ROUTING_KEY); + + console.log(`[Consumer] Connected and queue '${QUEUE_NAME}' bound to exchange '${EXCHANGE_NAME}'`); + } + + async start(): Promise { + if (!this.channel) { + throw new Error("Channel not initialized. Call connect() first."); + } + + console.log(`[Consumer] Starting to consume from queue '${QUEUE_NAME}'`); + + await this.channel.consume(QUEUE_NAME, async (msg) => { + if (!msg) return; + + try { + const envelope = JSON.parse(msg.content.toString()) as EventEnvelope; + console.log(`[Consumer] Received event: ${envelope.id} (${envelope.payload.action})`); + + await this.processEvent(envelope.payload); + + this.channel?.ack(msg); + console.log(`[Consumer] Event ${envelope.id} processed successfully`); + } catch (error) { + console.error(`[Consumer] Error processing event:`, error); + this.channel?.nack(msg, false, true); + } + }); + } + + private async processEvent(event: ADTEvent): Promise { + switch (event.action) { + case "admit": + await this.handleAdmit(event); + break; + case "discharge": + await this.handleDischarge(event); + break; + case "transfer": + await this.handleTransfer(event); + break; + default: + console.warn(`[Consumer] Unknown action: ${(event as ADTEvent).action}`); + } + } + + private async handleAdmit(event: ADTEvent): Promise { + console.log(`[Consumer] Processing admit for patient ${event.patient.patientId} to ward ${event.encounter.wardId}`); + + const patient = mapPatientFromEvent(event.patient); + const location = mapLocation( + event.encounter.wardId, + event.encounter.wardName, + event.encounter.siteName + ); + const encounter = mapEncounterFromEvent( + event.encounter, + `Patient/${patient.id}`, + `Location/${location.id}` + ); + + await this.fhirClient.storeLocation(location); + await this.fhirClient.storePatient(patient); + await this.fhirClient.storeEncounter(encounter); + + console.log(`[Consumer] Stored Patient/${patient.id}, Encounter/${encounter.id}, Location/${location.id}`); + } + + private async handleDischarge(event: ADTEvent): Promise { + console.log(`[Consumer] Processing discharge for patient ${event.patient.patientId}`); + + const patient = mapPatientFromEvent(event.patient); + const location = mapLocation( + event.encounter.wardId, + event.encounter.wardName, + event.encounter.siteName + ); + const encounter = mapEncounterFromEvent( + { ...event.encounter, status: "finished" }, + `Patient/${patient.id}`, + `Location/${location.id}` + ); + + await this.fhirClient.storeEncounter(encounter); + + console.log(`[Consumer] Updated Encounter/${encounter.id} to finished`); + } + + private async handleTransfer(event: ADTEvent): Promise { + console.log(`[Consumer] Processing transfer for patient ${event.patient.patientId} to ward ${event.encounter.wardId}`); + await this.handleAdmit(event); + } + + async close(): Promise { + await this.channel?.close(); + await this.connection?.close(); + console.log("[Consumer] Connection closed"); + } +} + +async function waitForRabbitMQ(url: string, maxRetries = 30): Promise { + for (let i = 0; i < maxRetries; i++) { + try { + const conn = await amqp.connect(url); + await conn.close(); + return; + } catch { + console.log(`[Consumer] Waiting for RabbitMQ... (${i + 1}/${maxRetries})`); + await new Promise((resolve) => setTimeout(resolve, 2000)); + } + } + throw new Error("Failed to connect to RabbitMQ after max retries"); +} + +async function waitForFhirServer(fhirClient: FhirClient, maxRetries = 30): Promise { + for (let i = 0; i < maxRetries; i++) { + const healthy = await fhirClient.healthCheck(); + if (healthy) return; + console.log(`[Consumer] Waiting for FHIR Server... (${i + 1}/${maxRetries})`); + await new Promise((resolve) => setTimeout(resolve, 2000)); + } + throw new Error("FHIR Server not available after max retries"); +} + +async function main(): Promise { + console.log("Event Consumer starting..."); + + const rabbitmqUrl = process.env.RABBITMQ_URL ?? "amqp://localhost"; + const prefetch = parseInt(process.env.PREFETCH ?? "10"); + + await waitForRabbitMQ(rabbitmqUrl); + console.log("[Consumer] RabbitMQ is available"); + + const fhirClient = createFhirClient(); + + await waitForFhirServer(fhirClient); + console.log("[Consumer] FHIR Server is available"); + + const consumer = new EventConsumer({ rabbitmqUrl, prefetch }, fhirClient); + + process.on("SIGINT", async () => { + console.log("\n[Consumer] Shutting down..."); + await consumer.close(); + process.exit(0); + }); + + await consumer.connect(); + await consumer.start(); + + console.log("[Consumer] Ready and waiting for events"); +} + +main().catch((error) => { + console.error("Consumer failed:", error); + process.exit(1); +}); diff --git a/aidbox-features/aidbox-canonical-mapping/src/event-driven/fhir-client.ts b/aidbox-features/aidbox-canonical-mapping/src/event-driven/fhir-client.ts new file mode 100644 index 0000000..4351c23 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/event-driven/fhir-client.ts @@ -0,0 +1,85 @@ +/** + * FHIR Client + * Stores FHIR resources in Aidbox FHIR R4 server using basic auth + */ + +import type { Patient } from "../fhir-types/hl7-fhir-r4-core/Patient"; +import type { Encounter } from "../fhir-types/hl7-fhir-r4-core/Encounter"; +import type { Location } from "../fhir-types/hl7-fhir-r4-core/Location"; +import type { Resource } from "../fhir-types/hl7-fhir-r4-core/Resource"; + +export class FhirClient { + private baseUrl: string; + private authHeader: string; + + constructor(baseUrl: string, clientId: string, clientSecret: string) { + this.baseUrl = baseUrl; + this.authHeader = "Basic " + btoa(`${clientId}:${clientSecret}`); + } + + private async fetch(url: string, init?: RequestInit): Promise { + return globalThis.fetch(url, { + ...init, + headers: { + ...init?.headers, + Authorization: this.authHeader, + }, + }); + } + + /** + * Create or update a resource using PUT + */ + async upsert(resource: T): Promise { + const url = `${this.baseUrl}/fhir/${resource.resourceType}/${resource.id}`; + + console.log(`[FhirClient] PUT ${url}`); + + const response = await this.fetch(url, { + method: "PUT", + headers: { + "Content-Type": "application/fhir+json", + Accept: "application/fhir+json", + }, + body: JSON.stringify(resource), + }); + + if (!response.ok) { + const error = await response.text(); + throw new Error(`FHIR Server error: ${response.status} - ${error}`); + } + + return response.json() as Promise; + } + + async storePatient(patient: Patient): Promise { + return this.upsert(patient); + } + + async storeEncounter(encounter: Encounter): Promise { + return this.upsert(encounter); + } + + async storeLocation(location: Location): Promise { + return this.upsert(location); + } + + async healthCheck(): Promise { + try { + const response = await this.fetch(`${this.baseUrl}/fhir/metadata`, { + headers: { Accept: "application/fhir+json" }, + }); + return response.ok; + } catch { + return false; + } + } +} + +export function createFhirClient(): FhirClient { + const baseUrl = process.env.FHIR_SERVER_URL ?? "http://localhost:8080"; + const clientId = process.env.AIDBOX_CLIENT_ID ?? "root"; + const clientSecret = process.env.AIDBOX_CLIENT_SECRET ?? "secret"; + + return new FhirClient(baseUrl, clientId, clientSecret); +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/event-driven/publisher.ts b/aidbox-features/aidbox-canonical-mapping/src/event-driven/publisher.ts new file mode 100644 index 0000000..e50f80c --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/event-driven/publisher.ts @@ -0,0 +1,180 @@ +/** + * Event Publisher (for testing) + * Publishes simulated ADT fat events to RabbitMQ + */ + +import * as amqp from "amqplib"; +import type { ADTEvent, ADTPatientData, ADTEncounterData, EventEnvelope } from "../shared/types/events"; +import { TEST_WARD_ID, TEST_WARD_NAME, TEST_SITE_NAME, TEST_PATIENTS } from "../shared/test-data"; + +const EXCHANGE_NAME = "his-events"; + +type AmqpConnection = Awaited>; +type AmqpChannel = Awaited>; + +class EventPublisher { + private connection: AmqpConnection | null = null; + private channel: AmqpChannel | null = null; + private rabbitmqUrl: string; + + constructor(rabbitmqUrl: string) { + this.rabbitmqUrl = rabbitmqUrl; + } + + async connect(): Promise { + console.log(`[Publisher] Connecting to RabbitMQ: ${this.rabbitmqUrl}`); + + this.connection = await amqp.connect(this.rabbitmqUrl); + this.channel = await this.connection.createChannel(); + + await this.channel.assertExchange(EXCHANGE_NAME, "topic", { durable: true }); + + console.log(`[Publisher] Connected`); + } + + async publish(event: ADTEvent): Promise { + if (!this.channel) { + throw new Error("Channel not initialized. Call connect() first."); + } + + const envelope: EventEnvelope = { + id: crypto.randomUUID(), + source: "his-simulator", + timestamp: new Date().toISOString(), + payload: event, + }; + + const routingKey = `adt.${event.action}`; + const message = JSON.stringify(envelope); + + this.channel.publish(EXCHANGE_NAME, routingKey, Buffer.from(message), { + persistent: true, + contentType: "application/json", + }); + + console.log(`[Publisher] Published event ${envelope.id} with routing key '${routingKey}'`); + } + + async close(): Promise { + await this.channel?.close(); + await this.connection?.close(); + console.log("[Publisher] Connection closed"); + } +} + +function createAdmitEvent( + patientData: ADTPatientData, + encounterData: Omit, + wardId: string, + wardName: string, + siteName: string +): ADTEvent { + return { + eventType: "ADT", + action: "admit", + timestamp: new Date().toISOString(), + patient: patientData, + encounter: { + ...encounterData, + wardId, + wardName, + siteName, + }, + }; +} + +function createDischargeEvent( + patientData: ADTPatientData, + encounterData: Omit, + wardId: string, + wardName: string, + siteName: string +): ADTEvent { + return { + eventType: "ADT", + action: "discharge", + timestamp: new Date().toISOString(), + patient: patientData, + encounter: { + ...encounterData, + wardId, + wardName, + siteName, + dischargeDate: new Date().toISOString(), + }, + }; +} + +function createTransferEvent( + patientData: ADTPatientData, + encounterData: Omit, + newWardId: string, + newWardName: string, + siteName: string, + newBedName: string +): ADTEvent { + return { + eventType: "ADT", + action: "transfer", + timestamp: new Date().toISOString(), + patient: patientData, + encounter: { + ...encounterData, + wardId: newWardId, + wardName: newWardName, + siteName, + bedName: newBedName, + }, + }; +} + +async function main(): Promise { + const rabbitmqUrl = process.env.RABBITMQ_URL ?? "amqp://localhost"; + const action = process.argv[2] as "admit" | "discharge" | "transfer" | undefined; + + if (!action || !["admit", "discharge", "transfer"].includes(action)) { + console.log("Usage: bun run src/event-driven/publisher.ts "); + console.log("\nExamples:"); + console.log(" bun run src/event-driven/publisher.ts admit"); + console.log(" bun run src/event-driven/publisher.ts discharge"); + console.log(" bun run src/event-driven/publisher.ts transfer"); + process.exit(1); + } + + const publisher = new EventPublisher(rabbitmqUrl); + await publisher.connect(); + + for (const { patient, encounter } of TEST_PATIENTS) { + let event: ADTEvent; + + switch (action) { + case "admit": + event = createAdmitEvent(patient, encounter, TEST_WARD_ID, TEST_WARD_NAME, TEST_SITE_NAME); + break; + case "discharge": + event = createDischargeEvent(patient, encounter, TEST_WARD_ID, TEST_WARD_NAME, TEST_SITE_NAME); + break; + case "transfer": + event = createTransferEvent( + patient, + encounter, + "ward-002", + "Ward 2", + TEST_SITE_NAME, + "Bed 1" + ); + break; + } + + await publisher.publish(event); + } + + console.log(`\n[Publisher] Published ${TEST_PATIENTS.length} ${action} events`); + + await publisher.close(); +} + +main().catch((error) => { + console.error("Publisher failed:", error); + process.exit(1); +}); diff --git a/aidbox-features/aidbox-canonical-mapping/src/facade/cache.ts b/aidbox-features/aidbox-canonical-mapping/src/facade/cache.ts new file mode 100644 index 0000000..16b6f33 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/facade/cache.ts @@ -0,0 +1,88 @@ +/** + * Redis-based TTL Cache + * Shared cache for multiple facade instances + */ + +import Redis from "ioredis"; + +export interface CacheConfig { + redisUrl: string; + ttlSeconds: number; + keyPrefix?: string; +} + +export class RedisCache { + private redis: Redis; + private ttlSeconds: number; + private keyPrefix: string; + + constructor(config: CacheConfig) { + this.redis = new Redis(config.redisUrl); + this.ttlSeconds = config.ttlSeconds; + this.keyPrefix = config.keyPrefix ?? "fhir-facade:"; + + this.redis.on("error", (err) => { + console.error("[Cache] Redis error:", err.message); + }); + + this.redis.on("connect", () => { + console.log("[Cache] Connected to Redis"); + }); + } + + private buildKey(key: string): string { + return `${this.keyPrefix}${key}`; + } + + async get(key: string): Promise { + const data = await this.redis.get(this.buildKey(key)); + if (!data) return undefined; + + try { + return JSON.parse(data) as T; + } catch { + return undefined; + } + } + + async set(key: string, value: T): Promise { + const data = JSON.stringify(value); + await this.redis.setex(this.buildKey(key), this.ttlSeconds, data); + } + + async delete(key: string): Promise { + const result = await this.redis.del(this.buildKey(key)); + return result > 0; + } + + async clear(): Promise { + const keys = await this.redis.keys(`${this.keyPrefix}*`); + if (keys.length > 0) { + await this.redis.del(...keys); + } + } + + async close(): Promise { + await this.redis.quit(); + } + + async ping(): Promise { + try { + const result = await this.redis.ping(); + return result === "PONG"; + } catch { + return false; + } + } +} + +export function createCache(): RedisCache { + const redisUrl = process.env.REDIS_URL ?? "redis://localhost:6379"; + const ttlSeconds = parseInt(process.env.CACHE_TTL_SECONDS ?? "60"); + + return new RedisCache({ + redisUrl, + ttlSeconds, + keyPrefix: "fhir-facade:ward:", + }); +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/facade/his-server.ts b/aidbox-features/aidbox-canonical-mapping/src/facade/his-server.ts new file mode 100644 index 0000000..f970233 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/facade/his-server.ts @@ -0,0 +1,126 @@ +/** + * Sample HIS (Hospital Information System) API Server + * + * A proprietary hospital API that returns patient and ward data. + * Represents the kind of system you'd integrate with in a real deployment. + * + * Endpoints: + * POST /oauth/token → Access token + * GET /api/{env}/Inpatient/v1/Wards/{wardId}/CurrentInpatients → Ward patients + * GET /api/{env}/PatientService/v1/Patients/{patientId} → Patient details + */ + +import { + TEST_WARD_ID, + TEST_PATIENTS, + toCurrentInpatient, + toHISPatient, +} from "../shared/test-data"; +import type { CurrentInpatientResponse } from "../shared/types/his"; + +const PORT = parseInt(process.env.PORT ?? "4000"); + +function json(data: unknown, status = 200): Response { + return new Response(JSON.stringify(data), { + status, + headers: { "Content-Type": "application/json" }, + }); +} + +// Build lookup maps +const inpatientsByWard = new Map(); +const patientsById = new Map>(); + +// Populate ward-001 with all test patients +const inpatients = TEST_PATIENTS.map(toCurrentInpatient); +inpatientsByWard.set(TEST_WARD_ID, { + pageIndex: 0, + pageSize: inpatients.length, + totalCount: inpatients.length, + totalPages: 1, + results: inpatients, +}); + +// Populate patient lookup +for (const record of TEST_PATIENTS) { + patientsById.set(record.patient.patientId, toHISPatient(record)); +} + +async function handleRequest(req: Request): Promise { + const url = new URL(req.url); + const path = url.pathname; + const method = req.method; + + console.log(`[HIS] ${method} ${path}`); + + // POST /oauth/token → always return a valid token + if (path === "/oauth/token" && method === "POST") { + return json({ + access_token: "his-access-token-" + Date.now(), + token_type: "Bearer", + expires_in: 3600, + }); + } + + // GET /api/{env}/Inpatient/v1/Wards/{wardId}/CurrentInpatients + const wardMatch = path.match( + /^\/api\/[^/]+\/Inpatient\/v1\/Wards\/([^/]+)\/CurrentInpatients$/ + ); + if (wardMatch && method === "GET") { + const wardId = wardMatch[1]; + const data = inpatientsByWard.get(wardId); + + if (!data) { + // Return empty result for unknown wards + return json({ + pageIndex: 0, + pageSize: 0, + totalCount: 0, + totalPages: 0, + results: [], + }); + } + + return json(data); + } + + // GET /api/{env}/PatientService/v1/Patients/{patientId} + const patientMatch = path.match( + /^\/api\/[^/]+\/PatientService\/v1\/Patients\/([^/]+)$/ + ); + if (patientMatch && method === "GET") { + const patientId = patientMatch[1]; + const patient = patientsById.get(patientId); + + if (!patient) { + return json({ error: "Patient not found" }, 404); + } + + return json(patient); + } + + // Health check + if (path === "/health") { + return json({ status: "ok" }); + } + + return json({ error: "Not found" }, 404); +} + +const server = Bun.serve({ + port: PORT, + fetch: handleRequest, +}); + +console.log(`HIS API running on http://localhost:${server.port}`); +console.log(`\nAvailable data:`); +console.log(` Ward: ${TEST_WARD_ID} (${TEST_PATIENTS.length} patients)`); +console.log(` Patients: ${TEST_PATIENTS.map((p) => p.patient.patientId).join(", ")}`); +console.log(`\nEndpoints:`); +console.log(` POST /oauth/token`); +console.log(` GET /api/{env}/Inpatient/v1/Wards/{wardId}/CurrentInpatients`); +console.log(` GET /api/{env}/PatientService/v1/Patients/{patientId}`); +console.log(`\nExample:`); +console.log( + ` curl http://localhost:${PORT}/api/TEST/Inpatient/v1/Wards/${TEST_WARD_ID}/CurrentInpatients` +); diff --git a/aidbox-features/aidbox-canonical-mapping/src/facade/index.ts b/aidbox-features/aidbox-canonical-mapping/src/facade/index.ts new file mode 100644 index 0000000..395e470 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/facade/index.ts @@ -0,0 +1,201 @@ +/** + * FHIR Facade Service + * Synchronous proxy between clients (FHIR API) and HIS API with Redis caching + */ + +import { HISClient, createHISClient } from "../shared/his-client"; +import { RedisCache, createCache } from "./cache"; +import { buildWardBundle, type Bundle } from "../shared/fhir-mapper"; +import type { OperationOutcome } from "../fhir-types/hl7-fhir-r4-core/OperationOutcome"; +import type { WardPatientData } from "../shared/types/his"; + +// ============ Configuration ============ + +const PORT = parseInt(process.env.PORT ?? "3000"); +const CACHE_TTL_SECONDS = parseInt(process.env.CACHE_TTL_SECONDS ?? "60"); + +// ============ Globals ============ + +let hisClient: HISClient; +let wardCache: RedisCache; + +// ============ Error Response Helpers ============ + +function operationOutcome( + severity: OperationOutcome["issue"][0]["severity"], + code: OperationOutcome["issue"][0]["code"], + diagnostics: string +): OperationOutcome { + return { + resourceType: "OperationOutcome", + issue: [{ severity, code, diagnostics }], + }; +} + +function jsonResponse(data: unknown, status = 200): Response { + return new Response(JSON.stringify(data, null, 2), { + status, + headers: { "Content-Type": "application/fhir+json" }, + }); +} + +// ============ Request Handlers ============ + +async function handleHealthCheck(): Promise { + const redisOk = await wardCache.ping(); + + return new Response( + JSON.stringify({ + status: redisOk ? "ok" : "degraded", + redis: redisOk ? "connected" : "disconnected", + }), + { + status: redisOk ? 200 : 503, + headers: { "Content-Type": "application/json" }, + } + ); +} + +async function handleGetWardPatients(wardId: string, baseUrl: string): Promise { + // Check cache first + const cached = await wardCache.get(wardId); + if (cached) { + console.log(`[Cache] HIT for ward ${wardId}`); + return jsonResponse(cached); + } + + console.log(`[Cache] MISS for ward ${wardId}`); + + try { + // Fetch ward patients from HIS + const inpatients = await hisClient.getWardPatients(wardId); + + if (inpatients.length === 0) { + const emptyBundle = buildWardBundle(wardId, undefined, undefined, [], baseUrl); + await wardCache.set(wardId, emptyBundle); + return jsonResponse(emptyBundle); + } + + // Get ward/site name from first inpatient's currentLocation + const firstLocation = inpatients[0]?.currentLocation; + const wardName = firstLocation?.wardName; + const siteName = firstLocation?.siteName; + + // Fetch patient details for each inpatient + const patientsData: WardPatientData[] = []; + + for (const inpatient of inpatients) { + try { + const patient = await hisClient.getPatientDetails(inpatient.patientId); + patientsData.push({ inpatient, patient }); + } catch (error) { + console.error(`[Error] Failed to fetch patient ${inpatient.patientId}:`, error); + } + } + + // Build FHIR Bundle + const bundle = buildWardBundle(wardId, wardName, siteName, patientsData, baseUrl); + + // Cache the result + await wardCache.set(wardId, bundle); + + return jsonResponse(bundle); + } catch (error) { + console.error("[Error] Failed to fetch ward data:", error); + + if (error instanceof Error) { + return jsonResponse( + operationOutcome("error", "exception", error.message), + 500 + ); + } + + return jsonResponse( + operationOutcome("error", "exception", "Internal server error"), + 500 + ); + } +} + +// ============ Router ============ + +async function handleRequest(req: Request): Promise { + const url = new URL(req.url); + const path = url.pathname; + const method = req.method; + + console.log(`${method} ${path}${url.search}`); + + if (path === "/health" || path === "/") { + return handleHealthCheck(); + } + + // Custom FHIR operation: $get-ward-patients (system-level) + // GET /fhir/$get-ward-patients?ward-id={wardId} + if (path === "/fhir/$get-ward-patients" && method === "GET") { + const wardId = url.searchParams.get("ward-id"); + if (!wardId) { + return jsonResponse( + operationOutcome("error", "required", "Missing required parameter: ward-id"), + 400 + ); + } + const baseUrl = `${url.protocol}//${url.host}/fhir`; + return handleGetWardPatients(wardId, baseUrl); + } + + return jsonResponse( + operationOutcome("error", "not-found", `Endpoint not found: ${path}`), + 404 + ); +} + +// ============ Server ============ + +async function startServer(): Promise { + console.log(`FHIR Facade Service starting...`); + console.log(` Cache TTL: ${CACHE_TTL_SECONDS}s`); + + wardCache = createCache(); + console.log(` Redis cache initializing...`); + + const redisOk = await wardCache.ping(); + if (!redisOk) { + console.error("Failed to connect to Redis"); + process.exit(1); + } + console.log(` Redis connected`); + + try { + hisClient = createHISClient(); + console.log(` HIS client initialized`); + } catch (error) { + console.error("Failed to initialize HIS client:", error); + process.exit(1); + } + + const server = Bun.serve({ + port: PORT, + fetch: handleRequest, + }); + + process.on("SIGINT", async () => { + console.log("\nShutting down..."); + await wardCache.close(); + process.exit(0); + }); + + console.log(`Server listening on http://localhost:${server.port}`); + console.log(`\nEndpoints:`); + console.log(` GET /health`); + console.log(` GET /fhir/$get-ward-patients?ward-id={wardId}`); + console.log(`\nExample:`); + console.log( + ` curl "http://localhost:${PORT}/fhir/\\$get-ward-patients?ward-id=ward-001"` + ); +} + +startServer().catch((error) => { + console.error("Failed to start server:", error); + process.exit(1); +}); diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/README.md b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/README.md new file mode 100644 index 0000000..5182ec4 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/README.md @@ -0,0 +1,2540 @@ +# IR Report + +## Package: `hl7.fhir.r4.core` + +### Skipped Canonicals + +- `http://fhir-registry.smarthealthit.org/StructureDefinition/capabilities` +- `http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris` +- `http://hl7.org/fhir/StructureDefinition/11179-objectClass` +- `http://hl7.org/fhir/StructureDefinition/11179-objectClassProperty` +- `http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap` +- `http://hl7.org/fhir/StructureDefinition/11179-permitted-value-valueset` +- `http://hl7.org/fhir/StructureDefinition/Account` +- `http://hl7.org/fhir/StructureDefinition/ActivityDefinition` +- `http://hl7.org/fhir/StructureDefinition/AdverseEvent` +- `http://hl7.org/fhir/StructureDefinition/AllergyIntolerance` +- `http://hl7.org/fhir/StructureDefinition/Appointment` +- `http://hl7.org/fhir/StructureDefinition/AppointmentResponse` +- `http://hl7.org/fhir/StructureDefinition/AuditEvent` +- `http://hl7.org/fhir/StructureDefinition/Basic` +- `http://hl7.org/fhir/StructureDefinition/Binary` +- `http://hl7.org/fhir/StructureDefinition/BiologicallyDerivedProduct` +- `http://hl7.org/fhir/StructureDefinition/BodyStructure` +- `http://hl7.org/fhir/StructureDefinition/Bundle` +- `http://hl7.org/fhir/StructureDefinition/CapabilityStatement` +- `http://hl7.org/fhir/StructureDefinition/CarePlan` +- `http://hl7.org/fhir/StructureDefinition/CareTeam` +- `http://hl7.org/fhir/StructureDefinition/CatalogEntry` +- `http://hl7.org/fhir/StructureDefinition/ChargeItem` +- `http://hl7.org/fhir/StructureDefinition/ChargeItemDefinition` +- `http://hl7.org/fhir/StructureDefinition/Claim` +- `http://hl7.org/fhir/StructureDefinition/ClaimResponse` +- `http://hl7.org/fhir/StructureDefinition/ClinicalImpression` +- `http://hl7.org/fhir/StructureDefinition/CodeSystem` +- `http://hl7.org/fhir/StructureDefinition/Communication` +- `http://hl7.org/fhir/StructureDefinition/CommunicationRequest` +- `http://hl7.org/fhir/StructureDefinition/CompartmentDefinition` +- `http://hl7.org/fhir/StructureDefinition/Composition` +- `http://hl7.org/fhir/StructureDefinition/ConceptMap` +- `http://hl7.org/fhir/StructureDefinition/Condition` +- `http://hl7.org/fhir/StructureDefinition/Consent` +- `http://hl7.org/fhir/StructureDefinition/Contract` +- `http://hl7.org/fhir/StructureDefinition/Coverage` +- `http://hl7.org/fhir/StructureDefinition/CoverageEligibilityRequest` +- `http://hl7.org/fhir/StructureDefinition/CoverageEligibilityResponse` +- `http://hl7.org/fhir/StructureDefinition/Definition` +- `http://hl7.org/fhir/StructureDefinition/DetectedIssue` +- `http://hl7.org/fhir/StructureDefinition/Device` +- `http://hl7.org/fhir/StructureDefinition/DeviceDefinition` +- `http://hl7.org/fhir/StructureDefinition/DeviceMetric` +- `http://hl7.org/fhir/StructureDefinition/DeviceRequest` +- `http://hl7.org/fhir/StructureDefinition/DeviceUseStatement` +- `http://hl7.org/fhir/StructureDefinition/DiagnosticReport` +- `http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis` +- `http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition` +- `http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory` +- `http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsReferences` +- `http://hl7.org/fhir/StructureDefinition/DocumentManifest` +- `http://hl7.org/fhir/StructureDefinition/DocumentReference` +- `http://hl7.org/fhir/StructureDefinition/EffectEvidenceSynthesis` +- `http://hl7.org/fhir/StructureDefinition/ElementDefinition` +- `http://hl7.org/fhir/StructureDefinition/Encounter` +- `http://hl7.org/fhir/StructureDefinition/Endpoint` +- `http://hl7.org/fhir/StructureDefinition/EnrollmentRequest` +- `http://hl7.org/fhir/StructureDefinition/EnrollmentResponse` +- `http://hl7.org/fhir/StructureDefinition/EpisodeOfCare` +- `http://hl7.org/fhir/StructureDefinition/Event` +- `http://hl7.org/fhir/StructureDefinition/EventDefinition` +- `http://hl7.org/fhir/StructureDefinition/Evidence` +- `http://hl7.org/fhir/StructureDefinition/EvidenceVariable` +- `http://hl7.org/fhir/StructureDefinition/ExampleScenario` +- `http://hl7.org/fhir/StructureDefinition/ExplanationOfBenefit` +- `http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory` +- `http://hl7.org/fhir/StructureDefinition/FiveWs` +- `http://hl7.org/fhir/StructureDefinition/Flag` +- `http://hl7.org/fhir/StructureDefinition/Goal` +- `http://hl7.org/fhir/StructureDefinition/GraphDefinition` +- `http://hl7.org/fhir/StructureDefinition/Group` +- `http://hl7.org/fhir/StructureDefinition/GuidanceResponse` +- `http://hl7.org/fhir/StructureDefinition/HealthcareService` +- `http://hl7.org/fhir/StructureDefinition/ImagingStudy` +- `http://hl7.org/fhir/StructureDefinition/Immunization` +- `http://hl7.org/fhir/StructureDefinition/ImmunizationEvaluation` +- `http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation` +- `http://hl7.org/fhir/StructureDefinition/ImplementationGuide` +- `http://hl7.org/fhir/StructureDefinition/InsurancePlan` +- `http://hl7.org/fhir/StructureDefinition/Invoice` +- `http://hl7.org/fhir/StructureDefinition/Library` +- `http://hl7.org/fhir/StructureDefinition/Linkage` +- `http://hl7.org/fhir/StructureDefinition/List` +- `http://hl7.org/fhir/StructureDefinition/Location` +- `http://hl7.org/fhir/StructureDefinition/MarketingStatus` +- `http://hl7.org/fhir/StructureDefinition/Measure` +- `http://hl7.org/fhir/StructureDefinition/MeasureReport` +- `http://hl7.org/fhir/StructureDefinition/Media` +- `http://hl7.org/fhir/StructureDefinition/Medication` +- `http://hl7.org/fhir/StructureDefinition/MedicationAdministration` +- `http://hl7.org/fhir/StructureDefinition/MedicationDispense` +- `http://hl7.org/fhir/StructureDefinition/MedicationKnowledge` +- `http://hl7.org/fhir/StructureDefinition/MedicationRequest` +- `http://hl7.org/fhir/StructureDefinition/MedicationStatement` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProduct` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductAuthorization` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductContraindication` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductIndication` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductIngredient` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductInteraction` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductManufactured` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductPackaged` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductPharmaceutical` +- `http://hl7.org/fhir/StructureDefinition/MedicinalProductUndesirableEffect` +- `http://hl7.org/fhir/StructureDefinition/MessageDefinition` +- `http://hl7.org/fhir/StructureDefinition/MessageHeader` +- `http://hl7.org/fhir/StructureDefinition/MetadataResource` +- `http://hl7.org/fhir/StructureDefinition/MolecularSequence` +- `http://hl7.org/fhir/StructureDefinition/MoneyQuantity` +- `http://hl7.org/fhir/StructureDefinition/NamingSystem` +- `http://hl7.org/fhir/StructureDefinition/NutritionOrder` +- `http://hl7.org/fhir/StructureDefinition/Observation` +- `http://hl7.org/fhir/StructureDefinition/ObservationDefinition` +- `http://hl7.org/fhir/StructureDefinition/OperationDefinition` +- `http://hl7.org/fhir/StructureDefinition/OperationOutcome` +- `http://hl7.org/fhir/StructureDefinition/Organization` +- `http://hl7.org/fhir/StructureDefinition/OrganizationAffiliation` +- `http://hl7.org/fhir/StructureDefinition/Parameters` +- `http://hl7.org/fhir/StructureDefinition/Patient` +- `http://hl7.org/fhir/StructureDefinition/PaymentNotice` +- `http://hl7.org/fhir/StructureDefinition/PaymentReconciliation` +- `http://hl7.org/fhir/StructureDefinition/Person` +- `http://hl7.org/fhir/StructureDefinition/PlanDefinition` +- `http://hl7.org/fhir/StructureDefinition/Population` +- `http://hl7.org/fhir/StructureDefinition/Practitioner` +- `http://hl7.org/fhir/StructureDefinition/PractitionerRole` +- `http://hl7.org/fhir/StructureDefinition/Procedure` +- `http://hl7.org/fhir/StructureDefinition/ProdCharacteristic` +- `http://hl7.org/fhir/StructureDefinition/ProductShelfLife` +- `http://hl7.org/fhir/StructureDefinition/Provenance` +- `http://hl7.org/fhir/StructureDefinition/Questionnaire` +- `http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse` +- `http://hl7.org/fhir/StructureDefinition/RelatedPerson` +- `http://hl7.org/fhir/StructureDefinition/Request` +- `http://hl7.org/fhir/StructureDefinition/RequestGroup` +- `http://hl7.org/fhir/StructureDefinition/ResearchDefinition` +- `http://hl7.org/fhir/StructureDefinition/ResearchElementDefinition` +- `http://hl7.org/fhir/StructureDefinition/ResearchStudy` +- `http://hl7.org/fhir/StructureDefinition/ResearchSubject` +- `http://hl7.org/fhir/StructureDefinition/RiskAssessment` +- `http://hl7.org/fhir/StructureDefinition/RiskEvidenceSynthesis` +- `http://hl7.org/fhir/StructureDefinition/Schedule` +- `http://hl7.org/fhir/StructureDefinition/SearchParameter` +- `http://hl7.org/fhir/StructureDefinition/ServiceRequest` +- `http://hl7.org/fhir/StructureDefinition/SimpleQuantity` +- `http://hl7.org/fhir/StructureDefinition/Slot` +- `http://hl7.org/fhir/StructureDefinition/Specimen` +- `http://hl7.org/fhir/StructureDefinition/SpecimenDefinition` +- `http://hl7.org/fhir/StructureDefinition/StructureDefinition` +- `http://hl7.org/fhir/StructureDefinition/StructureMap` +- `http://hl7.org/fhir/StructureDefinition/Subscription` +- `http://hl7.org/fhir/StructureDefinition/Substance` +- `http://hl7.org/fhir/StructureDefinition/SubstanceAmount` +- `http://hl7.org/fhir/StructureDefinition/SubstanceNucleicAcid` +- `http://hl7.org/fhir/StructureDefinition/SubstancePolymer` +- `http://hl7.org/fhir/StructureDefinition/SubstanceProtein` +- `http://hl7.org/fhir/StructureDefinition/SubstanceReferenceInformation` +- `http://hl7.org/fhir/StructureDefinition/SubstanceSourceMaterial` +- `http://hl7.org/fhir/StructureDefinition/SubstanceSpecification` +- `http://hl7.org/fhir/StructureDefinition/SupplyDelivery` +- `http://hl7.org/fhir/StructureDefinition/SupplyRequest` +- `http://hl7.org/fhir/StructureDefinition/Task` +- `http://hl7.org/fhir/StructureDefinition/TerminologyCapabilities` +- `http://hl7.org/fhir/StructureDefinition/TestReport` +- `http://hl7.org/fhir/StructureDefinition/TestScript` +- `http://hl7.org/fhir/StructureDefinition/ValueSet` +- `http://hl7.org/fhir/StructureDefinition/VerificationResult` +- `http://hl7.org/fhir/StructureDefinition/VisionPrescription` +- `http://hl7.org/fhir/StructureDefinition/actualgroup` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-assertedDate` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-certainty` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-duration` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-reasonRefuted` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-resolutionAge` +- `http://hl7.org/fhir/StructureDefinition/allergyintolerance-substanceExposureRisk` +- `http://hl7.org/fhir/StructureDefinition/auditevent-Accession` +- `http://hl7.org/fhir/StructureDefinition/auditevent-Anonymized` +- `http://hl7.org/fhir/StructureDefinition/auditevent-Encrypted` +- `http://hl7.org/fhir/StructureDefinition/auditevent-Instance` +- `http://hl7.org/fhir/StructureDefinition/auditevent-MPPS` +- `http://hl7.org/fhir/StructureDefinition/auditevent-NumberOfInstances` +- `http://hl7.org/fhir/StructureDefinition/auditevent-ParticipantObjectContainsStudy` +- `http://hl7.org/fhir/StructureDefinition/auditevent-SOPClass` +- `http://hl7.org/fhir/StructureDefinition/bmi` +- `http://hl7.org/fhir/StructureDefinition/bodySite` +- `http://hl7.org/fhir/StructureDefinition/bodyheight` +- `http://hl7.org/fhir/StructureDefinition/bodytemp` +- `http://hl7.org/fhir/StructureDefinition/bodyweight` +- `http://hl7.org/fhir/StructureDefinition/bp` +- `http://hl7.org/fhir/StructureDefinition/capabilitystatement-expectation` +- `http://hl7.org/fhir/StructureDefinition/capabilitystatement-prohibited` +- `http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination` +- `http://hl7.org/fhir/StructureDefinition/capabilitystatement-supported-system` +- `http://hl7.org/fhir/StructureDefinition/capabilitystatement-websocket` +- `http://hl7.org/fhir/StructureDefinition/careplan-activity-title` +- `http://hl7.org/fhir/StructureDefinition/catalog` +- `http://hl7.org/fhir/StructureDefinition/cdshooksguidanceresponse` +- `http://hl7.org/fhir/StructureDefinition/cdshooksrequestgroup` +- `http://hl7.org/fhir/StructureDefinition/cdshooksserviceplandefinition` +- `http://hl7.org/fhir/StructureDefinition/cholesterol` +- `http://hl7.org/fhir/StructureDefinition/clinicaldocument` +- `http://hl7.org/fhir/StructureDefinition/codesystem-alternate` +- `http://hl7.org/fhir/StructureDefinition/codesystem-author` +- `http://hl7.org/fhir/StructureDefinition/codesystem-concept-comments` +- `http://hl7.org/fhir/StructureDefinition/codesystem-conceptOrder` +- `http://hl7.org/fhir/StructureDefinition/codesystem-effectiveDate` +- `http://hl7.org/fhir/StructureDefinition/codesystem-expirationDate` +- `http://hl7.org/fhir/StructureDefinition/codesystem-history` +- `http://hl7.org/fhir/StructureDefinition/codesystem-keyWord` +- `http://hl7.org/fhir/StructureDefinition/codesystem-label` +- `http://hl7.org/fhir/StructureDefinition/codesystem-map` +- `http://hl7.org/fhir/StructureDefinition/codesystem-otherName` +- `http://hl7.org/fhir/StructureDefinition/codesystem-replacedby` +- `http://hl7.org/fhir/StructureDefinition/codesystem-sourceReference` +- `http://hl7.org/fhir/StructureDefinition/codesystem-trusted-expansion` +- `http://hl7.org/fhir/StructureDefinition/codesystem-usage` +- `http://hl7.org/fhir/StructureDefinition/codesystem-warning` +- `http://hl7.org/fhir/StructureDefinition/codesystem-workflowStatus` +- `http://hl7.org/fhir/StructureDefinition/coding-sctdescid` +- `http://hl7.org/fhir/StructureDefinition/communication-media` +- `http://hl7.org/fhir/StructureDefinition/communicationrequest-initiatingLocation` +- `http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-otherConfidentiality` +- `http://hl7.org/fhir/StructureDefinition/composition-clinicaldocument-versionNumber` +- `http://hl7.org/fhir/StructureDefinition/composition-section-subject` +- `http://hl7.org/fhir/StructureDefinition/computableplandefinition` +- `http://hl7.org/fhir/StructureDefinition/concept-bidirectional` +- `http://hl7.org/fhir/StructureDefinition/condition-assertedDate` +- `http://hl7.org/fhir/StructureDefinition/condition-dueTo` +- `http://hl7.org/fhir/StructureDefinition/condition-occurredFollowing` +- `http://hl7.org/fhir/StructureDefinition/condition-outcome` +- `http://hl7.org/fhir/StructureDefinition/condition-related` +- `http://hl7.org/fhir/StructureDefinition/condition-ruledOut` +- `http://hl7.org/fhir/StructureDefinition/consent-NotificationEndpoint` +- `http://hl7.org/fhir/StructureDefinition/consent-Transcriber` +- `http://hl7.org/fhir/StructureDefinition/consent-Witness` +- `http://hl7.org/fhir/StructureDefinition/consent-location` +- `http://hl7.org/fhir/StructureDefinition/contactpoint-area` +- `http://hl7.org/fhir/StructureDefinition/contactpoint-country` +- `http://hl7.org/fhir/StructureDefinition/contactpoint-extension` +- `http://hl7.org/fhir/StructureDefinition/contactpoint-local` +- `http://hl7.org/fhir/StructureDefinition/cqf-calculatedValue` +- `http://hl7.org/fhir/StructureDefinition/cqf-cdsHooksEndpoint` +- `http://hl7.org/fhir/StructureDefinition/cqf-citation` +- `http://hl7.org/fhir/StructureDefinition/cqf-encounterClass` +- `http://hl7.org/fhir/StructureDefinition/cqf-encounterType` +- `http://hl7.org/fhir/StructureDefinition/cqf-expression` +- `http://hl7.org/fhir/StructureDefinition/cqf-initialValue` +- `http://hl7.org/fhir/StructureDefinition/cqf-initiatingOrganization` +- `http://hl7.org/fhir/StructureDefinition/cqf-initiatingPerson` +- `http://hl7.org/fhir/StructureDefinition/cqf-library` +- `http://hl7.org/fhir/StructureDefinition/cqf-measureInfo` +- `http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence` +- `http://hl7.org/fhir/StructureDefinition/cqf-questionnaire` +- `http://hl7.org/fhir/StructureDefinition/cqf-receivingOrganization` +- `http://hl7.org/fhir/StructureDefinition/cqf-receivingPerson` +- `http://hl7.org/fhir/StructureDefinition/cqf-recipientLanguage` +- `http://hl7.org/fhir/StructureDefinition/cqf-recipientType` +- `http://hl7.org/fhir/StructureDefinition/cqf-relativeDateTime` +- `http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation` +- `http://hl7.org/fhir/StructureDefinition/cqf-systemUserLanguage` +- `http://hl7.org/fhir/StructureDefinition/cqf-systemUserTaskContext` +- `http://hl7.org/fhir/StructureDefinition/cqf-systemUserType` +- `http://hl7.org/fhir/StructureDefinition/cqllibrary` +- `http://hl7.org/fhir/StructureDefinition/cqm-ValidityPeriod` +- `http://hl7.org/fhir/StructureDefinition/data-absent-reason` +- `http://hl7.org/fhir/StructureDefinition/designNote` +- `http://hl7.org/fhir/StructureDefinition/device-implantStatus` +- `http://hl7.org/fhir/StructureDefinition/devicemetricobservation` +- `http://hl7.org/fhir/StructureDefinition/devicerequest-patientInstruction` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-extends` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-locationPerformed` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-replaces` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-risk` +- `http://hl7.org/fhir/StructureDefinition/diagnosticReport-summaryOf` +- `http://hl7.org/fhir/StructureDefinition/diagnosticreport-genetics` +- `http://hl7.org/fhir/StructureDefinition/display` +- `http://hl7.org/fhir/StructureDefinition/ehrsrle-auditevent` +- `http://hl7.org/fhir/StructureDefinition/ehrsrle-provenance` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-de` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-equivalence` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-identifier` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-inheritedExtensibleValueSet` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-minValueSet` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-profile-element` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-question` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-selector` +- `http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable` +- `http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter` +- `http://hl7.org/fhir/StructureDefinition/encounter-modeOfArrival` +- `http://hl7.org/fhir/StructureDefinition/encounter-reasonCancelled` +- `http://hl7.org/fhir/StructureDefinition/entryFormat` +- `http://hl7.org/fhir/StructureDefinition/event-basedOn` +- `http://hl7.org/fhir/StructureDefinition/event-eventHistory` +- `http://hl7.org/fhir/StructureDefinition/event-location` +- `http://hl7.org/fhir/StructureDefinition/event-partOf` +- `http://hl7.org/fhir/StructureDefinition/event-performerFunction` +- `http://hl7.org/fhir/StructureDefinition/event-statusReason` +- `http://hl7.org/fhir/StructureDefinition/example-composition` +- `http://hl7.org/fhir/StructureDefinition/example-section-library` +- `http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation` +- `http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent` +- `http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling` +- `http://hl7.org/fhir/StructureDefinition/familymemberhistory-abatement` +- `http://hl7.org/fhir/StructureDefinition/familymemberhistory-genetic` +- `http://hl7.org/fhir/StructureDefinition/familymemberhistory-patient-record` +- `http://hl7.org/fhir/StructureDefinition/familymemberhistory-severity` +- `http://hl7.org/fhir/StructureDefinition/familymemberhistory-type` +- `http://hl7.org/fhir/StructureDefinition/flag-detail` +- `http://hl7.org/fhir/StructureDefinition/flag-priority` +- `http://hl7.org/fhir/StructureDefinition/geolocation` +- `http://hl7.org/fhir/StructureDefinition/goal-acceptance` +- `http://hl7.org/fhir/StructureDefinition/goal-reasonRejected` +- `http://hl7.org/fhir/StructureDefinition/goal-relationship` +- `http://hl7.org/fhir/StructureDefinition/groupdefinition` +- `http://hl7.org/fhir/StructureDefinition/hdlcholesterol` +- `http://hl7.org/fhir/StructureDefinition/headcircum` +- `http://hl7.org/fhir/StructureDefinition/heartrate` +- `http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database` +- `http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring` +- `http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid` +- `http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method` +- `http://hl7.org/fhir/StructureDefinition/hlaresult` +- `http://hl7.org/fhir/StructureDefinition/http-response-header` +- `http://hl7.org/fhir/StructureDefinition/humanname-assembly-order` +- `http://hl7.org/fhir/StructureDefinition/humanname-fathers-family` +- `http://hl7.org/fhir/StructureDefinition/humanname-mothers-family` +- `http://hl7.org/fhir/StructureDefinition/humanname-own-name` +- `http://hl7.org/fhir/StructureDefinition/humanname-own-prefix` +- `http://hl7.org/fhir/StructureDefinition/humanname-partner-name` +- `http://hl7.org/fhir/StructureDefinition/humanname-partner-prefix` +- `http://hl7.org/fhir/StructureDefinition/identifier-validDate` +- `http://hl7.org/fhir/StructureDefinition/iso21090-AD-use` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-additionalLocator` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-buildingNumberSuffix` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-careOf` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-censusTract` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-delimiter` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryAddressLine` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationArea` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationQualifier` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryInstallationType` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryMode` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-deliveryModeIdentifier` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-direction` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumber` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-houseNumberNumeric` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-postBox` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetAddressLine` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetName` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameBase` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-streetNameType` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitID` +- `http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-unitType` +- `http://hl7.org/fhir/StructureDefinition/iso21090-EN-qualifier` +- `http://hl7.org/fhir/StructureDefinition/iso21090-EN-representation` +- `http://hl7.org/fhir/StructureDefinition/iso21090-EN-use` +- `http://hl7.org/fhir/StructureDefinition/iso21090-PQ-translation` +- `http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding` +- `http://hl7.org/fhir/StructureDefinition/iso21090-TEL-address` +- `http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor` +- `http://hl7.org/fhir/StructureDefinition/iso21090-preferred` +- `http://hl7.org/fhir/StructureDefinition/iso21090-uncertainty` +- `http://hl7.org/fhir/StructureDefinition/iso21090-uncertaintyType` +- `http://hl7.org/fhir/StructureDefinition/language` +- `http://hl7.org/fhir/StructureDefinition/ldlcholesterol` +- `http://hl7.org/fhir/StructureDefinition/lipidprofile` +- `http://hl7.org/fhir/StructureDefinition/list-changeBase` +- `http://hl7.org/fhir/StructureDefinition/location-boundary-geojson` +- `http://hl7.org/fhir/StructureDefinition/location-distance` +- `http://hl7.org/fhir/StructureDefinition/match-grade` +- `http://hl7.org/fhir/StructureDefinition/maxDecimalPlaces` +- `http://hl7.org/fhir/StructureDefinition/maxSize` +- `http://hl7.org/fhir/StructureDefinition/maxValue` +- `http://hl7.org/fhir/StructureDefinition/messageheader-response-request` +- `http://hl7.org/fhir/StructureDefinition/mimeType` +- `http://hl7.org/fhir/StructureDefinition/minLength` +- `http://hl7.org/fhir/StructureDefinition/minValue` +- `http://hl7.org/fhir/StructureDefinition/narrativeLink` +- `http://hl7.org/fhir/StructureDefinition/nutritionorder-adaptiveFeedingDevice` +- `http://hl7.org/fhir/StructureDefinition/observation-bodyPosition` +- `http://hl7.org/fhir/StructureDefinition/observation-delta` +- `http://hl7.org/fhir/StructureDefinition/observation-deviceCode` +- `http://hl7.org/fhir/StructureDefinition/observation-focusCode` +- `http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice` +- `http://hl7.org/fhir/StructureDefinition/observation-genetics` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsAllele` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChange` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsAncestry` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsGene` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet` +- `http://hl7.org/fhir/StructureDefinition/observation-geneticsVariant` +- `http://hl7.org/fhir/StructureDefinition/observation-precondition` +- `http://hl7.org/fhir/StructureDefinition/observation-reagent` +- `http://hl7.org/fhir/StructureDefinition/observation-replaces` +- `http://hl7.org/fhir/StructureDefinition/observation-secondaryFinding` +- `http://hl7.org/fhir/StructureDefinition/observation-sequelTo` +- `http://hl7.org/fhir/StructureDefinition/observation-specimenCode` +- `http://hl7.org/fhir/StructureDefinition/observation-timeOffset` +- `http://hl7.org/fhir/StructureDefinition/openEHR-administration` +- `http://hl7.org/fhir/StructureDefinition/openEHR-careplan` +- `http://hl7.org/fhir/StructureDefinition/openEHR-exposureDate` +- `http://hl7.org/fhir/StructureDefinition/openEHR-exposureDescription` +- `http://hl7.org/fhir/StructureDefinition/openEHR-exposureDuration` +- `http://hl7.org/fhir/StructureDefinition/openEHR-location` +- `http://hl7.org/fhir/StructureDefinition/openEHR-management` +- `http://hl7.org/fhir/StructureDefinition/openEHR-test` +- `http://hl7.org/fhir/StructureDefinition/operationdefinition-allowed-type` +- `http://hl7.org/fhir/StructureDefinition/operationdefinition-profile` +- `http://hl7.org/fhir/StructureDefinition/operationoutcome-authority` +- `http://hl7.org/fhir/StructureDefinition/operationoutcome-detectedIssue` +- `http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source` +- `http://hl7.org/fhir/StructureDefinition/ordinalValue` +- `http://hl7.org/fhir/StructureDefinition/organization-period` +- `http://hl7.org/fhir/StructureDefinition/organization-preferredContact` +- `http://hl7.org/fhir/StructureDefinition/organizationaffiliation-primaryInd` +- `http://hl7.org/fhir/StructureDefinition/originalText` +- `http://hl7.org/fhir/StructureDefinition/oxygensat` +- `http://hl7.org/fhir/StructureDefinition/parameters-fullUrl` +- `http://hl7.org/fhir/StructureDefinition/patient-adoptionInfo` +- `http://hl7.org/fhir/StructureDefinition/patient-animal` +- `http://hl7.org/fhir/StructureDefinition/patient-birthPlace` +- `http://hl7.org/fhir/StructureDefinition/patient-birthTime` +- `http://hl7.org/fhir/StructureDefinition/patient-cadavericDonor` +- `http://hl7.org/fhir/StructureDefinition/patient-citizenship` +- `http://hl7.org/fhir/StructureDefinition/patient-congregation` +- `http://hl7.org/fhir/StructureDefinition/patient-disability` +- `http://hl7.org/fhir/StructureDefinition/patient-genderIdentity` +- `http://hl7.org/fhir/StructureDefinition/patient-importance` +- `http://hl7.org/fhir/StructureDefinition/patient-interpreterRequired` +- `http://hl7.org/fhir/StructureDefinition/patient-mothersMaidenName` +- `http://hl7.org/fhir/StructureDefinition/patient-nationality` +- `http://hl7.org/fhir/StructureDefinition/patient-preferenceType` +- `http://hl7.org/fhir/StructureDefinition/patient-proficiency` +- `http://hl7.org/fhir/StructureDefinition/patient-relatedPerson` +- `http://hl7.org/fhir/StructureDefinition/patient-religion` +- `http://hl7.org/fhir/StructureDefinition/picoelement` +- `http://hl7.org/fhir/StructureDefinition/practitioner-animalSpecies` +- `http://hl7.org/fhir/StructureDefinition/practitionerrole-primaryInd` +- `http://hl7.org/fhir/StructureDefinition/procedure-approachBodyStructure` +- `http://hl7.org/fhir/StructureDefinition/procedure-causedBy` +- `http://hl7.org/fhir/StructureDefinition/procedure-directedBy` +- `http://hl7.org/fhir/StructureDefinition/procedure-incisionDateTime` +- `http://hl7.org/fhir/StructureDefinition/procedure-method` +- `http://hl7.org/fhir/StructureDefinition/procedure-progressStatus` +- `http://hl7.org/fhir/StructureDefinition/procedure-schedule` +- `http://hl7.org/fhir/StructureDefinition/procedure-targetBodyStructure` +- `http://hl7.org/fhir/StructureDefinition/provenance-relevant-history` +- `http://hl7.org/fhir/StructureDefinition/quantity-precision` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-baseType` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-choiceOrientation` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-constraint` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-fhirType` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-hidden` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-minOccurs` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-optionExclusive` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-optionPrefix` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-referenceProfile` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-sliderStepValue` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-unit` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet` +- `http://hl7.org/fhir/StructureDefinition/questionnaire-usageMode` +- `http://hl7.org/fhir/StructureDefinition/questionnaireresponse-author` +- `http://hl7.org/fhir/StructureDefinition/questionnaireresponse-completionMode` +- `http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason` +- `http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reviewer` +- `http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature` +- `http://hl7.org/fhir/StructureDefinition/regex` +- `http://hl7.org/fhir/StructureDefinition/relative-date` +- `http://hl7.org/fhir/StructureDefinition/rendered-value` +- `http://hl7.org/fhir/StructureDefinition/rendering-markdown` +- `http://hl7.org/fhir/StructureDefinition/rendering-style` +- `http://hl7.org/fhir/StructureDefinition/rendering-styleSensitive` +- `http://hl7.org/fhir/StructureDefinition/rendering-xhtml` +- `http://hl7.org/fhir/StructureDefinition/replaces` +- `http://hl7.org/fhir/StructureDefinition/request-doNotPerform` +- `http://hl7.org/fhir/StructureDefinition/request-insurance` +- `http://hl7.org/fhir/StructureDefinition/request-performerOrder` +- `http://hl7.org/fhir/StructureDefinition/request-relevantHistory` +- `http://hl7.org/fhir/StructureDefinition/request-replaces` +- `http://hl7.org/fhir/StructureDefinition/request-statusReason` +- `http://hl7.org/fhir/StructureDefinition/resource-approvalDate` +- `http://hl7.org/fhir/StructureDefinition/resource-effectivePeriod` +- `http://hl7.org/fhir/StructureDefinition/resource-lastReviewDate` +- `http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal` +- `http://hl7.org/fhir/StructureDefinition/resprate` +- `http://hl7.org/fhir/StructureDefinition/servicerequest-genetics` +- `http://hl7.org/fhir/StructureDefinition/servicerequest-geneticsItem` +- `http://hl7.org/fhir/StructureDefinition/servicerequest-precondition` +- `http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest` +- `http://hl7.org/fhir/StructureDefinition/shareableactivitydefinition` +- `http://hl7.org/fhir/StructureDefinition/shareablecodesystem` +- `http://hl7.org/fhir/StructureDefinition/shareablelibrary` +- `http://hl7.org/fhir/StructureDefinition/shareablemeasure` +- `http://hl7.org/fhir/StructureDefinition/shareableplandefinition` +- `http://hl7.org/fhir/StructureDefinition/shareablevalueset` +- `http://hl7.org/fhir/StructureDefinition/specimen-collectionPriority` +- `http://hl7.org/fhir/StructureDefinition/specimen-isDryWeight` +- `http://hl7.org/fhir/StructureDefinition/specimen-processingTime` +- `http://hl7.org/fhir/StructureDefinition/specimen-sequenceNumber` +- `http://hl7.org/fhir/StructureDefinition/specimen-specialHandling` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-ancestor` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-applicable-version` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-category` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-codegen-super` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm-no-warnings` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-summary` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-table-name` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-template-status` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-wg` +- `http://hl7.org/fhir/StructureDefinition/structuredefinition-xml-no-order` +- `http://hl7.org/fhir/StructureDefinition/synthesis` +- `http://hl7.org/fhir/StructureDefinition/task-candidateList` +- `http://hl7.org/fhir/StructureDefinition/task-replaces` +- `http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth` +- `http://hl7.org/fhir/StructureDefinition/timing-daysOfCycle` +- `http://hl7.org/fhir/StructureDefinition/timing-exact` +- `http://hl7.org/fhir/StructureDefinition/translation` +- `http://hl7.org/fhir/StructureDefinition/triglyceride` +- `http://hl7.org/fhir/StructureDefinition/tz-code` +- `http://hl7.org/fhir/StructureDefinition/tz-offset` +- `http://hl7.org/fhir/StructureDefinition/usagecontext-group` +- `http://hl7.org/fhir/StructureDefinition/valueset-activityStatusDate` +- `http://hl7.org/fhir/StructureDefinition/valueset-author` +- `http://hl7.org/fhir/StructureDefinition/valueset-authoritativeSource` +- `http://hl7.org/fhir/StructureDefinition/valueset-caseSensitive` +- `http://hl7.org/fhir/StructureDefinition/valueset-concept-comments` +- `http://hl7.org/fhir/StructureDefinition/valueset-concept-definition` +- `http://hl7.org/fhir/StructureDefinition/valueset-conceptOrder` +- `http://hl7.org/fhir/StructureDefinition/valueset-deprecated` +- `http://hl7.org/fhir/StructureDefinition/valueset-effectiveDate` +- `http://hl7.org/fhir/StructureDefinition/valueset-expand-group` +- `http://hl7.org/fhir/StructureDefinition/valueset-expand-rules` +- `http://hl7.org/fhir/StructureDefinition/valueset-expansionSource` +- `http://hl7.org/fhir/StructureDefinition/valueset-expirationDate` +- `http://hl7.org/fhir/StructureDefinition/valueset-expression` +- `http://hl7.org/fhir/StructureDefinition/valueset-extensible` +- `http://hl7.org/fhir/StructureDefinition/valueset-keyWord` +- `http://hl7.org/fhir/StructureDefinition/valueset-label` +- `http://hl7.org/fhir/StructureDefinition/valueset-map` +- `http://hl7.org/fhir/StructureDefinition/valueset-otherName` +- `http://hl7.org/fhir/StructureDefinition/valueset-parameterSource` +- `http://hl7.org/fhir/StructureDefinition/valueset-reference` +- `http://hl7.org/fhir/StructureDefinition/valueset-rules-text` +- `http://hl7.org/fhir/StructureDefinition/valueset-sourceReference` +- `http://hl7.org/fhir/StructureDefinition/valueset-special-status` +- `http://hl7.org/fhir/StructureDefinition/valueset-steward` +- `http://hl7.org/fhir/StructureDefinition/valueset-supplement` +- `http://hl7.org/fhir/StructureDefinition/valueset-system` +- `http://hl7.org/fhir/StructureDefinition/valueset-systemName` +- `http://hl7.org/fhir/StructureDefinition/valueset-systemRef` +- `http://hl7.org/fhir/StructureDefinition/valueset-toocostly` +- `http://hl7.org/fhir/StructureDefinition/valueset-trusted-expansion` +- `http://hl7.org/fhir/StructureDefinition/valueset-unclosed` +- `http://hl7.org/fhir/StructureDefinition/valueset-usage` +- `http://hl7.org/fhir/StructureDefinition/valueset-warning` +- `http://hl7.org/fhir/StructureDefinition/valueset-workflowStatus` +- `http://hl7.org/fhir/StructureDefinition/variable` +- `http://hl7.org/fhir/StructureDefinition/vitalsigns` +- `http://hl7.org/fhir/StructureDefinition/vitalspanel` +- `http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare` +- `http://hl7.org/fhir/StructureDefinition/workflow-instantiatesCanonical` +- `http://hl7.org/fhir/StructureDefinition/workflow-instantiatesUri` +- `http://hl7.org/fhir/StructureDefinition/workflow-reasonCode` +- `http://hl7.org/fhir/StructureDefinition/workflow-reasonReference` +- `http://hl7.org/fhir/StructureDefinition/workflow-relatedArtifact` +- `http://hl7.org/fhir/StructureDefinition/workflow-researchStudy` +- `http://hl7.org/fhir/StructureDefinition/workflow-supportingInfo` +- `http://hl7.org/fhir/ValueSet/FHIR-version` +- `http://hl7.org/fhir/ValueSet/abstract-types` +- `http://hl7.org/fhir/ValueSet/account-status` +- `http://hl7.org/fhir/ValueSet/account-type` +- `http://hl7.org/fhir/ValueSet/action-cardinality-behavior` +- `http://hl7.org/fhir/ValueSet/action-condition-kind` +- `http://hl7.org/fhir/ValueSet/action-grouping-behavior` +- `http://hl7.org/fhir/ValueSet/action-participant-role` +- `http://hl7.org/fhir/ValueSet/action-participant-type` +- `http://hl7.org/fhir/ValueSet/action-precheck-behavior` +- `http://hl7.org/fhir/ValueSet/action-relationship-type` +- `http://hl7.org/fhir/ValueSet/action-required-behavior` +- `http://hl7.org/fhir/ValueSet/action-selection-behavior` +- `http://hl7.org/fhir/ValueSet/action-type` +- `http://hl7.org/fhir/ValueSet/activity-definition-category` +- `http://hl7.org/fhir/ValueSet/additional-instruction-codes` +- `http://hl7.org/fhir/ValueSet/additionalmaterials` +- `http://hl7.org/fhir/ValueSet/address-type` +- `http://hl7.org/fhir/ValueSet/address-use` +- `http://hl7.org/fhir/ValueSet/adjudication` +- `http://hl7.org/fhir/ValueSet/adjudication-error` +- `http://hl7.org/fhir/ValueSet/adjudication-reason` +- `http://hl7.org/fhir/ValueSet/administration-method-codes` +- `http://hl7.org/fhir/ValueSet/administrative-gender` +- `http://hl7.org/fhir/ValueSet/adverse-event-actuality` +- `http://hl7.org/fhir/ValueSet/adverse-event-category` +- `http://hl7.org/fhir/ValueSet/adverse-event-causality-assess` +- `http://hl7.org/fhir/ValueSet/adverse-event-causality-method` +- `http://hl7.org/fhir/ValueSet/adverse-event-outcome` +- `http://hl7.org/fhir/ValueSet/adverse-event-seriousness` +- `http://hl7.org/fhir/ValueSet/adverse-event-severity` +- `http://hl7.org/fhir/ValueSet/adverse-event-type` +- `http://hl7.org/fhir/ValueSet/age-units` +- `http://hl7.org/fhir/ValueSet/all-distance-units` +- `http://hl7.org/fhir/ValueSet/all-languages` +- `http://hl7.org/fhir/ValueSet/all-time-units` +- `http://hl7.org/fhir/ValueSet/all-types` +- `http://hl7.org/fhir/ValueSet/allelename` +- `http://hl7.org/fhir/ValueSet/allerg-intol-substance-exp-risk` +- `http://hl7.org/fhir/ValueSet/allergy-intolerance-category` +- `http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality` +- `http://hl7.org/fhir/ValueSet/allergy-intolerance-type` +- `http://hl7.org/fhir/ValueSet/allergyintolerance-clinical` +- `http://hl7.org/fhir/ValueSet/allergyintolerance-code` +- `http://hl7.org/fhir/ValueSet/allergyintolerance-verification` +- `http://hl7.org/fhir/ValueSet/animal-breeds` +- `http://hl7.org/fhir/ValueSet/animal-genderstatus` +- `http://hl7.org/fhir/ValueSet/animal-species` +- `http://hl7.org/fhir/ValueSet/appointment-cancellation-reason` +- `http://hl7.org/fhir/ValueSet/appointmentstatus` +- `http://hl7.org/fhir/ValueSet/approach-site-codes` +- `http://hl7.org/fhir/ValueSet/assert-direction-codes` +- `http://hl7.org/fhir/ValueSet/assert-operator-codes` +- `http://hl7.org/fhir/ValueSet/assert-response-code-types` +- `http://hl7.org/fhir/ValueSet/asset-availability` +- `http://hl7.org/fhir/ValueSet/audit-entity-type` +- `http://hl7.org/fhir/ValueSet/audit-event-action` +- `http://hl7.org/fhir/ValueSet/audit-event-outcome` +- `http://hl7.org/fhir/ValueSet/audit-event-sub-type` +- `http://hl7.org/fhir/ValueSet/audit-event-type` +- `http://hl7.org/fhir/ValueSet/audit-source-type` +- `http://hl7.org/fhir/ValueSet/basic-resource-type` +- `http://hl7.org/fhir/ValueSet/benefit-network` +- `http://hl7.org/fhir/ValueSet/benefit-term` +- `http://hl7.org/fhir/ValueSet/benefit-type` +- `http://hl7.org/fhir/ValueSet/benefit-unit` +- `http://hl7.org/fhir/ValueSet/binding-strength` +- `http://hl7.org/fhir/ValueSet/body-site` +- `http://hl7.org/fhir/ValueSet/bodysite-laterality` +- `http://hl7.org/fhir/ValueSet/bodystructure-code` +- `http://hl7.org/fhir/ValueSet/bodystructure-relative-location` +- `http://hl7.org/fhir/ValueSet/bundle-type` +- `http://hl7.org/fhir/ValueSet/c80-doc-typecodes` +- `http://hl7.org/fhir/ValueSet/c80-facilitycodes` +- `http://hl7.org/fhir/ValueSet/c80-practice-codes` +- `http://hl7.org/fhir/ValueSet/capability-statement-kind` +- `http://hl7.org/fhir/ValueSet/care-plan-activity-kind` +- `http://hl7.org/fhir/ValueSet/care-plan-activity-outcome` +- `http://hl7.org/fhir/ValueSet/care-plan-activity-status` +- `http://hl7.org/fhir/ValueSet/care-plan-category` +- `http://hl7.org/fhir/ValueSet/care-plan-intent` +- `http://hl7.org/fhir/ValueSet/care-team-category` +- `http://hl7.org/fhir/ValueSet/care-team-status` +- `http://hl7.org/fhir/ValueSet/catalogType` +- `http://hl7.org/fhir/ValueSet/cdshooks-indicator` +- `http://hl7.org/fhir/ValueSet/certainty-subcomponent-rating` +- `http://hl7.org/fhir/ValueSet/certainty-subcomponent-type` +- `http://hl7.org/fhir/ValueSet/chargeitem-billingcodes` +- `http://hl7.org/fhir/ValueSet/chargeitem-status` +- `http://hl7.org/fhir/ValueSet/choice-list-orientation` +- `http://hl7.org/fhir/ValueSet/chromosome-human` +- `http://hl7.org/fhir/ValueSet/claim-careteamrole` +- `http://hl7.org/fhir/ValueSet/claim-exception` +- `http://hl7.org/fhir/ValueSet/claim-informationcategory` +- `http://hl7.org/fhir/ValueSet/claim-modifiers` +- `http://hl7.org/fhir/ValueSet/claim-subtype` +- `http://hl7.org/fhir/ValueSet/claim-type` +- `http://hl7.org/fhir/ValueSet/claim-use` +- `http://hl7.org/fhir/ValueSet/clinical-findings` +- `http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis` +- `http://hl7.org/fhir/ValueSet/clinicalimpression-status` +- `http://hl7.org/fhir/ValueSet/clinvar` +- `http://hl7.org/fhir/ValueSet/code-search-support` +- `http://hl7.org/fhir/ValueSet/codesystem-altcode-kind` +- `http://hl7.org/fhir/ValueSet/codesystem-content-mode` +- `http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning` +- `http://hl7.org/fhir/ValueSet/common-tags` +- `http://hl7.org/fhir/ValueSet/communication-category` +- `http://hl7.org/fhir/ValueSet/communication-not-done-reason` +- `http://hl7.org/fhir/ValueSet/communication-topic` +- `http://hl7.org/fhir/ValueSet/compartment-type` +- `http://hl7.org/fhir/ValueSet/composite-measure-scoring` +- `http://hl7.org/fhir/ValueSet/composition-altcode-kind` +- `http://hl7.org/fhir/ValueSet/composition-attestation-mode` +- `http://hl7.org/fhir/ValueSet/composition-status` +- `http://hl7.org/fhir/ValueSet/concept-map-equivalence` +- `http://hl7.org/fhir/ValueSet/concept-property-type` +- `http://hl7.org/fhir/ValueSet/concept-subsumption-outcome` +- `http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode` +- `http://hl7.org/fhir/ValueSet/condition-category` +- `http://hl7.org/fhir/ValueSet/condition-cause` +- `http://hl7.org/fhir/ValueSet/condition-clinical` +- `http://hl7.org/fhir/ValueSet/condition-code` +- `http://hl7.org/fhir/ValueSet/condition-outcome` +- `http://hl7.org/fhir/ValueSet/condition-predecessor` +- `http://hl7.org/fhir/ValueSet/condition-severity` +- `http://hl7.org/fhir/ValueSet/condition-stage` +- `http://hl7.org/fhir/ValueSet/condition-stage-type` +- `http://hl7.org/fhir/ValueSet/condition-state` +- `http://hl7.org/fhir/ValueSet/condition-ver-status` +- `http://hl7.org/fhir/ValueSet/conditional-delete-status` +- `http://hl7.org/fhir/ValueSet/conditional-read-status` +- `http://hl7.org/fhir/ValueSet/conformance-expectation` +- `http://hl7.org/fhir/ValueSet/consent-action` +- `http://hl7.org/fhir/ValueSet/consent-category` +- `http://hl7.org/fhir/ValueSet/consent-content-class` +- `http://hl7.org/fhir/ValueSet/consent-content-code` +- `http://hl7.org/fhir/ValueSet/consent-data-meaning` +- `http://hl7.org/fhir/ValueSet/consent-performer` +- `http://hl7.org/fhir/ValueSet/consent-policy` +- `http://hl7.org/fhir/ValueSet/consent-provision-type` +- `http://hl7.org/fhir/ValueSet/consent-scope` +- `http://hl7.org/fhir/ValueSet/consent-state-codes` +- `http://hl7.org/fhir/ValueSet/consistency-type` +- `http://hl7.org/fhir/ValueSet/constraint-severity` +- `http://hl7.org/fhir/ValueSet/contact-point-system` +- `http://hl7.org/fhir/ValueSet/contact-point-use` +- `http://hl7.org/fhir/ValueSet/contactentity-type` +- `http://hl7.org/fhir/ValueSet/container-cap` +- `http://hl7.org/fhir/ValueSet/container-material` +- `http://hl7.org/fhir/ValueSet/contract-action` +- `http://hl7.org/fhir/ValueSet/contract-actionstatus` +- `http://hl7.org/fhir/ValueSet/contract-actorrole` +- `http://hl7.org/fhir/ValueSet/contract-assetcontext` +- `http://hl7.org/fhir/ValueSet/contract-assetscope` +- `http://hl7.org/fhir/ValueSet/contract-assetsubtype` +- `http://hl7.org/fhir/ValueSet/contract-assettype` +- `http://hl7.org/fhir/ValueSet/contract-content-derivative` +- `http://hl7.org/fhir/ValueSet/contract-data-meaning` +- `http://hl7.org/fhir/ValueSet/contract-decision-mode` +- `http://hl7.org/fhir/ValueSet/contract-definition-subtype` +- `http://hl7.org/fhir/ValueSet/contract-definition-type` +- `http://hl7.org/fhir/ValueSet/contract-expiration-type` +- `http://hl7.org/fhir/ValueSet/contract-legalstate` +- `http://hl7.org/fhir/ValueSet/contract-party-role` +- `http://hl7.org/fhir/ValueSet/contract-publicationstatus` +- `http://hl7.org/fhir/ValueSet/contract-scope` +- `http://hl7.org/fhir/ValueSet/contract-security-category` +- `http://hl7.org/fhir/ValueSet/contract-security-classification` +- `http://hl7.org/fhir/ValueSet/contract-security-control` +- `http://hl7.org/fhir/ValueSet/contract-signer-type` +- `http://hl7.org/fhir/ValueSet/contract-status` +- `http://hl7.org/fhir/ValueSet/contract-subtype` +- `http://hl7.org/fhir/ValueSet/contract-term-subtype` +- `http://hl7.org/fhir/ValueSet/contract-term-type` +- `http://hl7.org/fhir/ValueSet/contract-type` +- `http://hl7.org/fhir/ValueSet/contributor-type` +- `http://hl7.org/fhir/ValueSet/copy-number-event` +- `http://hl7.org/fhir/ValueSet/cosmic` +- `http://hl7.org/fhir/ValueSet/coverage-class` +- `http://hl7.org/fhir/ValueSet/coverage-copay-type` +- `http://hl7.org/fhir/ValueSet/coverage-financial-exception` +- `http://hl7.org/fhir/ValueSet/coverage-selfpay` +- `http://hl7.org/fhir/ValueSet/coverage-type` +- `http://hl7.org/fhir/ValueSet/coverageeligibilityresponse-ex-auth-support` +- `http://hl7.org/fhir/ValueSet/cpt-all` +- `http://hl7.org/fhir/ValueSet/currencies` +- `http://hl7.org/fhir/ValueSet/data-absent-reason` +- `http://hl7.org/fhir/ValueSet/data-types` +- `http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclass` +- `http://hl7.org/fhir/ValueSet/dataelement-sdcobjectclassproperty` +- `http://hl7.org/fhir/ValueSet/days-of-week` +- `http://hl7.org/fhir/ValueSet/dbsnp` +- `http://hl7.org/fhir/ValueSet/defined-types` +- `http://hl7.org/fhir/ValueSet/definition-resource-types` +- `http://hl7.org/fhir/ValueSet/definition-status` +- `http://hl7.org/fhir/ValueSet/definition-topic` +- `http://hl7.org/fhir/ValueSet/definition-use` +- `http://hl7.org/fhir/ValueSet/designation-use` +- `http://hl7.org/fhir/ValueSet/detectedissue-category` +- `http://hl7.org/fhir/ValueSet/detectedissue-mitigation-action` +- `http://hl7.org/fhir/ValueSet/detectedissue-severity` +- `http://hl7.org/fhir/ValueSet/device-action` +- `http://hl7.org/fhir/ValueSet/device-component-property` +- `http://hl7.org/fhir/ValueSet/device-definition-status` +- `http://hl7.org/fhir/ValueSet/device-kind` +- `http://hl7.org/fhir/ValueSet/device-nametype` +- `http://hl7.org/fhir/ValueSet/device-safety` +- `http://hl7.org/fhir/ValueSet/device-statement-status` +- `http://hl7.org/fhir/ValueSet/device-status` +- `http://hl7.org/fhir/ValueSet/device-status-reason` +- `http://hl7.org/fhir/ValueSet/device-type` +- `http://hl7.org/fhir/ValueSet/devicemetric-type` +- `http://hl7.org/fhir/ValueSet/diagnosis-role` +- `http://hl7.org/fhir/ValueSet/diagnostic-based-on-snomed` +- `http://hl7.org/fhir/ValueSet/diagnostic-report-status` +- `http://hl7.org/fhir/ValueSet/diagnostic-service-sections` +- `http://hl7.org/fhir/ValueSet/dicm-405-mediatype` +- `http://hl7.org/fhir/ValueSet/diet-type` +- `http://hl7.org/fhir/ValueSet/discriminator-type` +- `http://hl7.org/fhir/ValueSet/distance-units` +- `http://hl7.org/fhir/ValueSet/doc-section-codes` +- `http://hl7.org/fhir/ValueSet/doc-typecodes` +- `http://hl7.org/fhir/ValueSet/document-classcodes` +- `http://hl7.org/fhir/ValueSet/document-mode` +- `http://hl7.org/fhir/ValueSet/document-reference-status` +- `http://hl7.org/fhir/ValueSet/document-relationship-type` +- `http://hl7.org/fhir/ValueSet/dose-rate-type` +- `http://hl7.org/fhir/ValueSet/duration-units` +- `http://hl7.org/fhir/ValueSet/effect-estimate-type` +- `http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose` +- `http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose` +- `http://hl7.org/fhir/ValueSet/encounter-admit-source` +- `http://hl7.org/fhir/ValueSet/encounter-diet` +- `http://hl7.org/fhir/ValueSet/encounter-discharge-disposition` +- `http://hl7.org/fhir/ValueSet/encounter-location-status` +- `http://hl7.org/fhir/ValueSet/encounter-participant-type` +- `http://hl7.org/fhir/ValueSet/encounter-reason` +- `http://hl7.org/fhir/ValueSet/encounter-special-arrangements` +- `http://hl7.org/fhir/ValueSet/encounter-special-courtesy` +- `http://hl7.org/fhir/ValueSet/encounter-status` +- `http://hl7.org/fhir/ValueSet/encounter-type` +- `http://hl7.org/fhir/ValueSet/endpoint-connection-type` +- `http://hl7.org/fhir/ValueSet/endpoint-payload-type` +- `http://hl7.org/fhir/ValueSet/endpoint-status` +- `http://hl7.org/fhir/ValueSet/ensembl` +- `http://hl7.org/fhir/ValueSet/enteral-route` +- `http://hl7.org/fhir/ValueSet/entformula-additive` +- `http://hl7.org/fhir/ValueSet/entformula-type` +- `http://hl7.org/fhir/ValueSet/episode-of-care-status` +- `http://hl7.org/fhir/ValueSet/episodeofcare-type` +- `http://hl7.org/fhir/ValueSet/event-capability-mode` +- `http://hl7.org/fhir/ValueSet/event-or-request-resource-types` +- `http://hl7.org/fhir/ValueSet/event-resource-types` +- `http://hl7.org/fhir/ValueSet/event-status` +- `http://hl7.org/fhir/ValueSet/event-timing` +- `http://hl7.org/fhir/ValueSet/evidence-quality` +- `http://hl7.org/fhir/ValueSet/evidence-variant-state` +- `http://hl7.org/fhir/ValueSet/ex-benefitcategory` +- `http://hl7.org/fhir/ValueSet/ex-diagnosis-on-admission` +- `http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup` +- `http://hl7.org/fhir/ValueSet/ex-diagnosistype` +- `http://hl7.org/fhir/ValueSet/ex-onsettype` +- `http://hl7.org/fhir/ValueSet/ex-payee-resource-type` +- `http://hl7.org/fhir/ValueSet/ex-paymenttype` +- `http://hl7.org/fhir/ValueSet/ex-procedure-type` +- `http://hl7.org/fhir/ValueSet/ex-program-code` +- `http://hl7.org/fhir/ValueSet/ex-revenue-center` +- `http://hl7.org/fhir/ValueSet/example-expansion` +- `http://hl7.org/fhir/ValueSet/example-extensional` +- `http://hl7.org/fhir/ValueSet/example-filter` +- `http://hl7.org/fhir/ValueSet/example-hierarchical` +- `http://hl7.org/fhir/ValueSet/example-intensional` +- `http://hl7.org/fhir/ValueSet/examplescenario-actor-type` +- `http://hl7.org/fhir/ValueSet/expansion-parameter-source` +- `http://hl7.org/fhir/ValueSet/expansion-processing-rule` +- `http://hl7.org/fhir/ValueSet/explanationofbenefit-status` +- `http://hl7.org/fhir/ValueSet/exposure-state` +- `http://hl7.org/fhir/ValueSet/expression-language` +- `http://hl7.org/fhir/ValueSet/extension-context-type` +- `http://hl7.org/fhir/ValueSet/feeding-device` +- `http://hl7.org/fhir/ValueSet/filter-operator` +- `http://hl7.org/fhir/ValueSet/financial-taskcode` +- `http://hl7.org/fhir/ValueSet/financial-taskinputtype` +- `http://hl7.org/fhir/ValueSet/flag-category` +- `http://hl7.org/fhir/ValueSet/flag-code` +- `http://hl7.org/fhir/ValueSet/flag-priority` +- `http://hl7.org/fhir/ValueSet/flag-status` +- `http://hl7.org/fhir/ValueSet/fm-conditions` +- `http://hl7.org/fhir/ValueSet/fm-itemtype` +- `http://hl7.org/fhir/ValueSet/fm-status` +- `http://hl7.org/fhir/ValueSet/focal-subject` +- `http://hl7.org/fhir/ValueSet/food-type` +- `http://hl7.org/fhir/ValueSet/formatcodes` +- `http://hl7.org/fhir/ValueSet/forms` +- `http://hl7.org/fhir/ValueSet/fundsreserve` +- `http://hl7.org/fhir/ValueSet/gender-identity` +- `http://hl7.org/fhir/ValueSet/genenames` +- `http://hl7.org/fhir/ValueSet/goal-acceptance-status` +- `http://hl7.org/fhir/ValueSet/goal-achievement` +- `http://hl7.org/fhir/ValueSet/goal-category` +- `http://hl7.org/fhir/ValueSet/goal-priority` +- `http://hl7.org/fhir/ValueSet/goal-relationship-type` +- `http://hl7.org/fhir/ValueSet/goal-start-event` +- `http://hl7.org/fhir/ValueSet/goal-status` +- `http://hl7.org/fhir/ValueSet/goal-status-reason` +- `http://hl7.org/fhir/ValueSet/graph-compartment-rule` +- `http://hl7.org/fhir/ValueSet/graph-compartment-use` +- `http://hl7.org/fhir/ValueSet/group-measure` +- `http://hl7.org/fhir/ValueSet/group-type` +- `http://hl7.org/fhir/ValueSet/guidance-response-status` +- `http://hl7.org/fhir/ValueSet/guide-page-generation` +- `http://hl7.org/fhir/ValueSet/guide-parameter-code` +- `http://hl7.org/fhir/ValueSet/handling-condition` +- `http://hl7.org/fhir/ValueSet/history-absent-reason` +- `http://hl7.org/fhir/ValueSet/history-status` +- `http://hl7.org/fhir/ValueSet/hl7-work-group` +- `http://hl7.org/fhir/ValueSet/http-operations` +- `http://hl7.org/fhir/ValueSet/http-verb` +- `http://hl7.org/fhir/ValueSet/icd-10` +- `http://hl7.org/fhir/ValueSet/icd-10-procedures` +- `http://hl7.org/fhir/ValueSet/identifier-type` +- `http://hl7.org/fhir/ValueSet/identifier-use` +- `http://hl7.org/fhir/ValueSet/identity-assuranceLevel` +- `http://hl7.org/fhir/ValueSet/imagingstudy-status` +- `http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status` +- `http://hl7.org/fhir/ValueSet/immunization-evaluation-dose-status-reason` +- `http://hl7.org/fhir/ValueSet/immunization-evaluation-status` +- `http://hl7.org/fhir/ValueSet/immunization-evaluation-target-disease` +- `http://hl7.org/fhir/ValueSet/immunization-function` +- `http://hl7.org/fhir/ValueSet/immunization-funding-source` +- `http://hl7.org/fhir/ValueSet/immunization-origin` +- `http://hl7.org/fhir/ValueSet/immunization-program-eligibility` +- `http://hl7.org/fhir/ValueSet/immunization-reason` +- `http://hl7.org/fhir/ValueSet/immunization-recommendation-date-criterion` +- `http://hl7.org/fhir/ValueSet/immunization-recommendation-reason` +- `http://hl7.org/fhir/ValueSet/immunization-recommendation-status` +- `http://hl7.org/fhir/ValueSet/immunization-recommendation-target-disease` +- `http://hl7.org/fhir/ValueSet/immunization-route` +- `http://hl7.org/fhir/ValueSet/immunization-site` +- `http://hl7.org/fhir/ValueSet/immunization-status` +- `http://hl7.org/fhir/ValueSet/immunization-status-reason` +- `http://hl7.org/fhir/ValueSet/immunization-subpotent-reason` +- `http://hl7.org/fhir/ValueSet/immunization-target-disease` +- `http://hl7.org/fhir/ValueSet/implantStatus` +- `http://hl7.org/fhir/ValueSet/inactive` +- `http://hl7.org/fhir/ValueSet/instance-availability` +- `http://hl7.org/fhir/ValueSet/insuranceplan-applicability` +- `http://hl7.org/fhir/ValueSet/insuranceplan-type` +- `http://hl7.org/fhir/ValueSet/intervention` +- `http://hl7.org/fhir/ValueSet/investigation-sets` +- `http://hl7.org/fhir/ValueSet/invoice-priceComponentType` +- `http://hl7.org/fhir/ValueSet/invoice-status` +- `http://hl7.org/fhir/ValueSet/iso3166-1-2` +- `http://hl7.org/fhir/ValueSet/iso3166-1-3` +- `http://hl7.org/fhir/ValueSet/iso3166-1-N` +- `http://hl7.org/fhir/ValueSet/issue-severity` +- `http://hl7.org/fhir/ValueSet/issue-type` +- `http://hl7.org/fhir/ValueSet/item-type` +- `http://hl7.org/fhir/ValueSet/jurisdiction` +- `http://hl7.org/fhir/ValueSet/knowledge-resource-types` +- `http://hl7.org/fhir/ValueSet/language-preference-type` +- `http://hl7.org/fhir/ValueSet/languages` +- `http://hl7.org/fhir/ValueSet/ldlcholesterol-codes` +- `http://hl7.org/fhir/ValueSet/library-type` +- `http://hl7.org/fhir/ValueSet/link-type` +- `http://hl7.org/fhir/ValueSet/linkage-type` +- `http://hl7.org/fhir/ValueSet/list-empty-reason` +- `http://hl7.org/fhir/ValueSet/list-example-codes` +- `http://hl7.org/fhir/ValueSet/list-item-flag` +- `http://hl7.org/fhir/ValueSet/list-mode` +- `http://hl7.org/fhir/ValueSet/list-order` +- `http://hl7.org/fhir/ValueSet/list-status` +- `http://hl7.org/fhir/ValueSet/location-mode` +- `http://hl7.org/fhir/ValueSet/location-physical-type` +- `http://hl7.org/fhir/ValueSet/location-status` +- `http://hl7.org/fhir/ValueSet/manifestation-or-symptom` +- `http://hl7.org/fhir/ValueSet/map-context-type` +- `http://hl7.org/fhir/ValueSet/map-group-type-mode` +- `http://hl7.org/fhir/ValueSet/map-input-mode` +- `http://hl7.org/fhir/ValueSet/map-model-mode` +- `http://hl7.org/fhir/ValueSet/map-source-list-mode` +- `http://hl7.org/fhir/ValueSet/map-target-list-mode` +- `http://hl7.org/fhir/ValueSet/map-transform` +- `http://hl7.org/fhir/ValueSet/marital-status` +- `http://hl7.org/fhir/ValueSet/match-grade` +- `http://hl7.org/fhir/ValueSet/measure-data-usage` +- `http://hl7.org/fhir/ValueSet/measure-improvement-notation` +- `http://hl7.org/fhir/ValueSet/measure-population` +- `http://hl7.org/fhir/ValueSet/measure-report-status` +- `http://hl7.org/fhir/ValueSet/measure-report-type` +- `http://hl7.org/fhir/ValueSet/measure-scoring` +- `http://hl7.org/fhir/ValueSet/measure-type` +- `http://hl7.org/fhir/ValueSet/med-admin-perform-function` +- `http://hl7.org/fhir/ValueSet/media-modality` +- `http://hl7.org/fhir/ValueSet/media-type` +- `http://hl7.org/fhir/ValueSet/media-view` +- `http://hl7.org/fhir/ValueSet/medication-admin-category` +- `http://hl7.org/fhir/ValueSet/medication-admin-status` +- `http://hl7.org/fhir/ValueSet/medication-as-needed-reason` +- `http://hl7.org/fhir/ValueSet/medication-codes` +- `http://hl7.org/fhir/ValueSet/medication-form-codes` +- `http://hl7.org/fhir/ValueSet/medication-statement-category` +- `http://hl7.org/fhir/ValueSet/medication-statement-status` +- `http://hl7.org/fhir/ValueSet/medication-status` +- `http://hl7.org/fhir/ValueSet/medicationdispense-category` +- `http://hl7.org/fhir/ValueSet/medicationdispense-performer-function` +- `http://hl7.org/fhir/ValueSet/medicationdispense-status` +- `http://hl7.org/fhir/ValueSet/medicationdispense-status-reason` +- `http://hl7.org/fhir/ValueSet/medicationknowledge-characteristic` +- `http://hl7.org/fhir/ValueSet/medicationknowledge-package-type` +- `http://hl7.org/fhir/ValueSet/medicationknowledge-status` +- `http://hl7.org/fhir/ValueSet/medicationrequest-category` +- `http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy` +- `http://hl7.org/fhir/ValueSet/medicationrequest-intent` +- `http://hl7.org/fhir/ValueSet/medicationrequest-status` +- `http://hl7.org/fhir/ValueSet/medicationrequest-status-reason` +- `http://hl7.org/fhir/ValueSet/message-events` +- `http://hl7.org/fhir/ValueSet/message-reason-encounter` +- `http://hl7.org/fhir/ValueSet/message-significance-category` +- `http://hl7.org/fhir/ValueSet/message-transport` +- `http://hl7.org/fhir/ValueSet/messageheader-response-request` +- `http://hl7.org/fhir/ValueSet/metric-calibration-state` +- `http://hl7.org/fhir/ValueSet/metric-calibration-type` +- `http://hl7.org/fhir/ValueSet/metric-category` +- `http://hl7.org/fhir/ValueSet/metric-color` +- `http://hl7.org/fhir/ValueSet/metric-operational-status` +- `http://hl7.org/fhir/ValueSet/mimetypes` +- `http://hl7.org/fhir/ValueSet/missing-tooth-reason` +- `http://hl7.org/fhir/ValueSet/modified-foodtype` +- `http://hl7.org/fhir/ValueSet/name-assembly-order` +- `http://hl7.org/fhir/ValueSet/name-part-qualifier` +- `http://hl7.org/fhir/ValueSet/name-use` +- `http://hl7.org/fhir/ValueSet/name-v3-representation` +- `http://hl7.org/fhir/ValueSet/namingsystem-identifier-type` +- `http://hl7.org/fhir/ValueSet/namingsystem-type` +- `http://hl7.org/fhir/ValueSet/narrative-status` +- `http://hl7.org/fhir/ValueSet/network-type` +- `http://hl7.org/fhir/ValueSet/nhin-purposeofuse` +- `http://hl7.org/fhir/ValueSet/note-type` +- `http://hl7.org/fhir/ValueSet/nutrient-code` +- `http://hl7.org/fhir/ValueSet/object-lifecycle-events` +- `http://hl7.org/fhir/ValueSet/object-role` +- `http://hl7.org/fhir/ValueSet/observation-category` +- `http://hl7.org/fhir/ValueSet/observation-codes` +- `http://hl7.org/fhir/ValueSet/observation-interpretation` +- `http://hl7.org/fhir/ValueSet/observation-methods` +- `http://hl7.org/fhir/ValueSet/observation-range-category` +- `http://hl7.org/fhir/ValueSet/observation-statistics` +- `http://hl7.org/fhir/ValueSet/observation-status` +- `http://hl7.org/fhir/ValueSet/observation-vitalsignresult` +- `http://hl7.org/fhir/ValueSet/operation-kind` +- `http://hl7.org/fhir/ValueSet/operation-outcome` +- `http://hl7.org/fhir/ValueSet/operation-parameter-use` +- `http://hl7.org/fhir/ValueSet/oral-prosthodontic-material` +- `http://hl7.org/fhir/ValueSet/organization-role` +- `http://hl7.org/fhir/ValueSet/organization-type` +- `http://hl7.org/fhir/ValueSet/orientation-type` +- `http://hl7.org/fhir/ValueSet/parameter-group` +- `http://hl7.org/fhir/ValueSet/parent-relationship-codes` +- `http://hl7.org/fhir/ValueSet/participant-role` +- `http://hl7.org/fhir/ValueSet/participantrequired` +- `http://hl7.org/fhir/ValueSet/participation-role-type` +- `http://hl7.org/fhir/ValueSet/participationstatus` +- `http://hl7.org/fhir/ValueSet/patient-contactrelationship` +- `http://hl7.org/fhir/ValueSet/payeetype` +- `http://hl7.org/fhir/ValueSet/payment-adjustment-reason` +- `http://hl7.org/fhir/ValueSet/payment-status` +- `http://hl7.org/fhir/ValueSet/payment-type` +- `http://hl7.org/fhir/ValueSet/performer-function` +- `http://hl7.org/fhir/ValueSet/performer-role` +- `http://hl7.org/fhir/ValueSet/permitted-data-type` +- `http://hl7.org/fhir/ValueSet/plan-definition-type` +- `http://hl7.org/fhir/ValueSet/postal-address-use` +- `http://hl7.org/fhir/ValueSet/practitioner-role` +- `http://hl7.org/fhir/ValueSet/practitioner-specialty` +- `http://hl7.org/fhir/ValueSet/precision-estimate-type` +- `http://hl7.org/fhir/ValueSet/prepare-patient-prior-specimen-collection` +- `http://hl7.org/fhir/ValueSet/probability-distribution-type` +- `http://hl7.org/fhir/ValueSet/procedure-category` +- `http://hl7.org/fhir/ValueSet/procedure-code` +- `http://hl7.org/fhir/ValueSet/procedure-followup` +- `http://hl7.org/fhir/ValueSet/procedure-not-performed-reason` +- `http://hl7.org/fhir/ValueSet/procedure-outcome` +- `http://hl7.org/fhir/ValueSet/procedure-progress-status-codes` +- `http://hl7.org/fhir/ValueSet/procedure-reason` +- `http://hl7.org/fhir/ValueSet/process-priority` +- `http://hl7.org/fhir/ValueSet/product-category` +- `http://hl7.org/fhir/ValueSet/product-status` +- `http://hl7.org/fhir/ValueSet/product-storage-scale` +- `http://hl7.org/fhir/ValueSet/program` +- `http://hl7.org/fhir/ValueSet/property-representation` +- `http://hl7.org/fhir/ValueSet/provenance-activity-type` +- `http://hl7.org/fhir/ValueSet/provenance-agent-role` +- `http://hl7.org/fhir/ValueSet/provenance-agent-type` +- `http://hl7.org/fhir/ValueSet/provenance-entity-role` +- `http://hl7.org/fhir/ValueSet/provenance-history-agent-type` +- `http://hl7.org/fhir/ValueSet/provenance-history-record-activity` +- `http://hl7.org/fhir/ValueSet/provider-qualification` +- `http://hl7.org/fhir/ValueSet/provider-taxonomy` +- `http://hl7.org/fhir/ValueSet/publication-status` +- `http://hl7.org/fhir/ValueSet/quality-type` +- `http://hl7.org/fhir/ValueSet/quantity-comparator` +- `http://hl7.org/fhir/ValueSet/question-max-occurs` +- `http://hl7.org/fhir/ValueSet/questionnaire-answers` +- `http://hl7.org/fhir/ValueSet/questionnaire-answers-status` +- `http://hl7.org/fhir/ValueSet/questionnaire-category` +- `http://hl7.org/fhir/ValueSet/questionnaire-display-category` +- `http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior` +- `http://hl7.org/fhir/ValueSet/questionnaire-enable-operator` +- `http://hl7.org/fhir/ValueSet/questionnaire-item-control` +- `http://hl7.org/fhir/ValueSet/questionnaire-questions` +- `http://hl7.org/fhir/ValueSet/questionnaire-usage-mode` +- `http://hl7.org/fhir/ValueSet/questionnaireresponse-mode` +- `http://hl7.org/fhir/ValueSet/reaction-event-certainty` +- `http://hl7.org/fhir/ValueSet/reaction-event-severity` +- `http://hl7.org/fhir/ValueSet/reason-medication-given-codes` +- `http://hl7.org/fhir/ValueSet/reason-medication-not-given-codes` +- `http://hl7.org/fhir/ValueSet/reason-medication-status-codes` +- `http://hl7.org/fhir/ValueSet/recommendation-strength` +- `http://hl7.org/fhir/ValueSet/ref-sequences` +- `http://hl7.org/fhir/ValueSet/reference-handling-policy` +- `http://hl7.org/fhir/ValueSet/reference-version-rules` +- `http://hl7.org/fhir/ValueSet/referencerange-appliesto` +- `http://hl7.org/fhir/ValueSet/referencerange-meaning` +- `http://hl7.org/fhir/ValueSet/rejection-criteria` +- `http://hl7.org/fhir/ValueSet/related-artifact-type` +- `http://hl7.org/fhir/ValueSet/related-claim-relationship` +- `http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype` +- `http://hl7.org/fhir/ValueSet/relation-type` +- `http://hl7.org/fhir/ValueSet/relationship` +- `http://hl7.org/fhir/ValueSet/remittance-outcome` +- `http://hl7.org/fhir/ValueSet/report-action-result-codes` +- `http://hl7.org/fhir/ValueSet/report-codes` +- `http://hl7.org/fhir/ValueSet/report-participant-type` +- `http://hl7.org/fhir/ValueSet/report-result-codes` +- `http://hl7.org/fhir/ValueSet/report-status-codes` +- `http://hl7.org/fhir/ValueSet/repository-type` +- `http://hl7.org/fhir/ValueSet/request-intent` +- `http://hl7.org/fhir/ValueSet/request-priority` +- `http://hl7.org/fhir/ValueSet/request-resource-types` +- `http://hl7.org/fhir/ValueSet/request-status` +- `http://hl7.org/fhir/ValueSet/research-element-type` +- `http://hl7.org/fhir/ValueSet/research-study-objective-type` +- `http://hl7.org/fhir/ValueSet/research-study-phase` +- `http://hl7.org/fhir/ValueSet/research-study-prim-purp-type` +- `http://hl7.org/fhir/ValueSet/research-study-reason-stopped` +- `http://hl7.org/fhir/ValueSet/research-study-status` +- `http://hl7.org/fhir/ValueSet/research-subject-status` +- `http://hl7.org/fhir/ValueSet/resource-aggregation-mode` +- `http://hl7.org/fhir/ValueSet/resource-security-category` +- `http://hl7.org/fhir/ValueSet/resource-slicing-rules` +- `http://hl7.org/fhir/ValueSet/resource-status` +- `http://hl7.org/fhir/ValueSet/resource-type-link` +- `http://hl7.org/fhir/ValueSet/resource-types` +- `http://hl7.org/fhir/ValueSet/resource-validation-mode` +- `http://hl7.org/fhir/ValueSet/response-code` +- `http://hl7.org/fhir/ValueSet/restful-capability-mode` +- `http://hl7.org/fhir/ValueSet/restful-security-service` +- `http://hl7.org/fhir/ValueSet/risk-estimate-type` +- `http://hl7.org/fhir/ValueSet/risk-probability` +- `http://hl7.org/fhir/ValueSet/route-codes` +- `http://hl7.org/fhir/ValueSet/search-comparator` +- `http://hl7.org/fhir/ValueSet/search-entry-mode` +- `http://hl7.org/fhir/ValueSet/search-modifier-code` +- `http://hl7.org/fhir/ValueSet/search-param-type` +- `http://hl7.org/fhir/ValueSet/search-xpath-usage` +- `http://hl7.org/fhir/ValueSet/secondary-finding` +- `http://hl7.org/fhir/ValueSet/security-labels` +- `http://hl7.org/fhir/ValueSet/security-role-type` +- `http://hl7.org/fhir/ValueSet/sequence-quality-method` +- `http://hl7.org/fhir/ValueSet/sequence-quality-standardSequence` +- `http://hl7.org/fhir/ValueSet/sequence-referenceSeq` +- `http://hl7.org/fhir/ValueSet/sequence-species` +- `http://hl7.org/fhir/ValueSet/sequence-type` +- `http://hl7.org/fhir/ValueSet/sequenceontology` +- `http://hl7.org/fhir/ValueSet/series-performer-function` +- `http://hl7.org/fhir/ValueSet/service-category` +- `http://hl7.org/fhir/ValueSet/service-modifiers` +- `http://hl7.org/fhir/ValueSet/service-pharmacy` +- `http://hl7.org/fhir/ValueSet/service-place` +- `http://hl7.org/fhir/ValueSet/service-product` +- `http://hl7.org/fhir/ValueSet/service-provision-conditions` +- `http://hl7.org/fhir/ValueSet/service-referral-method` +- `http://hl7.org/fhir/ValueSet/service-type` +- `http://hl7.org/fhir/ValueSet/service-uscls` +- `http://hl7.org/fhir/ValueSet/servicerequest-category` +- `http://hl7.org/fhir/ValueSet/servicerequest-orderdetail` +- `http://hl7.org/fhir/ValueSet/sibling-relationship-codes` +- `http://hl7.org/fhir/ValueSet/signature-type` +- `http://hl7.org/fhir/ValueSet/slotstatus` +- `http://hl7.org/fhir/ValueSet/smart-capabilities` +- `http://hl7.org/fhir/ValueSet/sort-direction` +- `http://hl7.org/fhir/ValueSet/spdx-license` +- `http://hl7.org/fhir/ValueSet/special-values` +- `http://hl7.org/fhir/ValueSet/specimen-collection` +- `http://hl7.org/fhir/ValueSet/specimen-collection-method` +- `http://hl7.org/fhir/ValueSet/specimen-collection-priority` +- `http://hl7.org/fhir/ValueSet/specimen-contained-preference` +- `http://hl7.org/fhir/ValueSet/specimen-container-type` +- `http://hl7.org/fhir/ValueSet/specimen-processing-procedure` +- `http://hl7.org/fhir/ValueSet/specimen-status` +- `http://hl7.org/fhir/ValueSet/standards-status` +- `http://hl7.org/fhir/ValueSet/strand-type` +- `http://hl7.org/fhir/ValueSet/structure-definition-kind` +- `http://hl7.org/fhir/ValueSet/study-type` +- `http://hl7.org/fhir/ValueSet/subject-type` +- `http://hl7.org/fhir/ValueSet/subscriber-relationship` +- `http://hl7.org/fhir/ValueSet/subscription-channel-type` +- `http://hl7.org/fhir/ValueSet/subscription-status` +- `http://hl7.org/fhir/ValueSet/subscription-tag` +- `http://hl7.org/fhir/ValueSet/substance-category` +- `http://hl7.org/fhir/ValueSet/substance-code` +- `http://hl7.org/fhir/ValueSet/substance-status` +- `http://hl7.org/fhir/ValueSet/supplement-type` +- `http://hl7.org/fhir/ValueSet/supply-item` +- `http://hl7.org/fhir/ValueSet/supplydelivery-status` +- `http://hl7.org/fhir/ValueSet/supplydelivery-type` +- `http://hl7.org/fhir/ValueSet/supplyrequest-kind` +- `http://hl7.org/fhir/ValueSet/supplyrequest-reason` +- `http://hl7.org/fhir/ValueSet/supplyrequest-status` +- `http://hl7.org/fhir/ValueSet/surface` +- `http://hl7.org/fhir/ValueSet/synthesis-type` +- `http://hl7.org/fhir/ValueSet/system-restful-interaction` +- `http://hl7.org/fhir/ValueSet/task-code` +- `http://hl7.org/fhir/ValueSet/task-intent` +- `http://hl7.org/fhir/ValueSet/task-status` +- `http://hl7.org/fhir/ValueSet/teeth` +- `http://hl7.org/fhir/ValueSet/template-status-code` +- `http://hl7.org/fhir/ValueSet/testscript-operation-codes` +- `http://hl7.org/fhir/ValueSet/testscript-profile-destination-types` +- `http://hl7.org/fhir/ValueSet/testscript-profile-origin-types` +- `http://hl7.org/fhir/ValueSet/texture-code` +- `http://hl7.org/fhir/ValueSet/timezones` +- `http://hl7.org/fhir/ValueSet/timing-abbreviation` +- `http://hl7.org/fhir/ValueSet/tooth` +- `http://hl7.org/fhir/ValueSet/transaction-mode` +- `http://hl7.org/fhir/ValueSet/trigger-type` +- `http://hl7.org/fhir/ValueSet/type-derivation-rule` +- `http://hl7.org/fhir/ValueSet/type-restful-interaction` +- `http://hl7.org/fhir/ValueSet/ucum-bodylength` +- `http://hl7.org/fhir/ValueSet/ucum-bodytemp` +- `http://hl7.org/fhir/ValueSet/ucum-bodyweight` +- `http://hl7.org/fhir/ValueSet/ucum-common` +- `http://hl7.org/fhir/ValueSet/ucum-units` +- `http://hl7.org/fhir/ValueSet/ucum-vitals-common` +- `http://hl7.org/fhir/ValueSet/udi` +- `http://hl7.org/fhir/ValueSet/udi-entry-type` +- `http://hl7.org/fhir/ValueSet/units-of-time` +- `http://hl7.org/fhir/ValueSet/unknown-content-code` +- `http://hl7.org/fhir/ValueSet/usage-context-type` +- `http://hl7.org/fhir/ValueSet/use-context` +- `http://hl7.org/fhir/ValueSet/vaccine-code` +- `http://hl7.org/fhir/ValueSet/variable-type` +- `http://hl7.org/fhir/ValueSet/variant-state` +- `http://hl7.org/fhir/ValueSet/variants` +- `http://hl7.org/fhir/ValueSet/verificationresult-can-push-updates` +- `http://hl7.org/fhir/ValueSet/verificationresult-communication-method` +- `http://hl7.org/fhir/ValueSet/verificationresult-failure-action` +- `http://hl7.org/fhir/ValueSet/verificationresult-need` +- `http://hl7.org/fhir/ValueSet/verificationresult-primary-source-type` +- `http://hl7.org/fhir/ValueSet/verificationresult-push-type-available` +- `http://hl7.org/fhir/ValueSet/verificationresult-status` +- `http://hl7.org/fhir/ValueSet/verificationresult-validation-process` +- `http://hl7.org/fhir/ValueSet/verificationresult-validation-status` +- `http://hl7.org/fhir/ValueSet/verificationresult-validation-type` +- `http://hl7.org/fhir/ValueSet/versioning-policy` +- `http://hl7.org/fhir/ValueSet/vision-base-codes` +- `http://hl7.org/fhir/ValueSet/vision-eye-codes` +- `http://hl7.org/fhir/ValueSet/vision-product` +- `http://hl7.org/fhir/ValueSet/written-language` +- `http://hl7.org/fhir/ValueSet/yesnodontknow` +- `http://terminology.hl7.org/ValueSet/v2-0001` +- `http://terminology.hl7.org/ValueSet/v2-0002` +- `http://terminology.hl7.org/ValueSet/v2-0003` +- `http://terminology.hl7.org/ValueSet/v2-0004` +- `http://terminology.hl7.org/ValueSet/v2-0005` +- `http://terminology.hl7.org/ValueSet/v2-0007` +- `http://terminology.hl7.org/ValueSet/v2-0008` +- `http://terminology.hl7.org/ValueSet/v2-0009` +- `http://terminology.hl7.org/ValueSet/v2-0012` +- `http://terminology.hl7.org/ValueSet/v2-0017` +- `http://terminology.hl7.org/ValueSet/v2-0023` +- `http://terminology.hl7.org/ValueSet/v2-0027` +- `http://terminology.hl7.org/ValueSet/v2-0033` +- `http://terminology.hl7.org/ValueSet/v2-0034` +- `http://terminology.hl7.org/ValueSet/v2-0038` +- `http://terminology.hl7.org/ValueSet/v2-0043` +- `http://terminology.hl7.org/ValueSet/v2-0048` +- `http://terminology.hl7.org/ValueSet/v2-0052` +- `http://terminology.hl7.org/ValueSet/v2-0061` +- `http://terminology.hl7.org/ValueSet/v2-0062` +- `http://terminology.hl7.org/ValueSet/v2-0063` +- `http://terminology.hl7.org/ValueSet/v2-0065` +- `http://terminology.hl7.org/ValueSet/v2-0066` +- `http://terminology.hl7.org/ValueSet/v2-0069` +- `http://terminology.hl7.org/ValueSet/v2-0070` +- `http://terminology.hl7.org/ValueSet/v2-0074` +- `http://terminology.hl7.org/ValueSet/v2-0076` +- `http://terminology.hl7.org/ValueSet/v2-0078` +- `http://terminology.hl7.org/ValueSet/v2-0080` +- `http://terminology.hl7.org/ValueSet/v2-0083` +- `http://terminology.hl7.org/ValueSet/v2-0085` +- `http://terminology.hl7.org/ValueSet/v2-0091` +- `http://terminology.hl7.org/ValueSet/v2-0092` +- `http://terminology.hl7.org/ValueSet/v2-0098` +- `http://terminology.hl7.org/ValueSet/v2-0100` +- `http://terminology.hl7.org/ValueSet/v2-0102` +- `http://terminology.hl7.org/ValueSet/v2-0103` +- `http://terminology.hl7.org/ValueSet/v2-0104` +- `http://terminology.hl7.org/ValueSet/v2-0105` +- `http://terminology.hl7.org/ValueSet/v2-0106` +- `http://terminology.hl7.org/ValueSet/v2-0107` +- `http://terminology.hl7.org/ValueSet/v2-0108` +- `http://terminology.hl7.org/ValueSet/v2-0109` +- `http://terminology.hl7.org/ValueSet/v2-0116` +- `http://terminology.hl7.org/ValueSet/v2-0119` +- `http://terminology.hl7.org/ValueSet/v2-0121` +- `http://terminology.hl7.org/ValueSet/v2-0122` +- `http://terminology.hl7.org/ValueSet/v2-0123` +- `http://terminology.hl7.org/ValueSet/v2-0124` +- `http://terminology.hl7.org/ValueSet/v2-0125` +- `http://terminology.hl7.org/ValueSet/v2-0126` +- `http://terminology.hl7.org/ValueSet/v2-0127` +- `http://terminology.hl7.org/ValueSet/v2-0128` +- `http://terminology.hl7.org/ValueSet/v2-0130` +- `http://terminology.hl7.org/ValueSet/v2-0131` +- `http://terminology.hl7.org/ValueSet/v2-0133` +- `http://terminology.hl7.org/ValueSet/v2-0135` +- `http://terminology.hl7.org/ValueSet/v2-0136` +- `http://terminology.hl7.org/ValueSet/v2-0137` +- `http://terminology.hl7.org/ValueSet/v2-0140` +- `http://terminology.hl7.org/ValueSet/v2-0141` +- `http://terminology.hl7.org/ValueSet/v2-0142` +- `http://terminology.hl7.org/ValueSet/v2-0144` +- `http://terminology.hl7.org/ValueSet/v2-0145` +- `http://terminology.hl7.org/ValueSet/v2-0146` +- `http://terminology.hl7.org/ValueSet/v2-0147` +- `http://terminology.hl7.org/ValueSet/v2-0148` +- `http://terminology.hl7.org/ValueSet/v2-0149` +- `http://terminology.hl7.org/ValueSet/v2-0150` +- `http://terminology.hl7.org/ValueSet/v2-0153` +- `http://terminology.hl7.org/ValueSet/v2-0155` +- `http://terminology.hl7.org/ValueSet/v2-0156` +- `http://terminology.hl7.org/ValueSet/v2-0157` +- `http://terminology.hl7.org/ValueSet/v2-0158` +- `http://terminology.hl7.org/ValueSet/v2-0159` +- `http://terminology.hl7.org/ValueSet/v2-0160` +- `http://terminology.hl7.org/ValueSet/v2-0161` +- `http://terminology.hl7.org/ValueSet/v2-0162` +- `http://terminology.hl7.org/ValueSet/v2-0163` +- `http://terminology.hl7.org/ValueSet/v2-0164` +- `http://terminology.hl7.org/ValueSet/v2-0165` +- `http://terminology.hl7.org/ValueSet/v2-0166` +- `http://terminology.hl7.org/ValueSet/v2-0167` +- `http://terminology.hl7.org/ValueSet/v2-0168` +- `http://terminology.hl7.org/ValueSet/v2-0169` +- `http://terminology.hl7.org/ValueSet/v2-0170` +- `http://terminology.hl7.org/ValueSet/v2-0173` +- `http://terminology.hl7.org/ValueSet/v2-0174` +- `http://terminology.hl7.org/ValueSet/v2-0175` +- `http://terminology.hl7.org/ValueSet/v2-0177` +- `http://terminology.hl7.org/ValueSet/v2-0178` +- `http://terminology.hl7.org/ValueSet/v2-0179` +- `http://terminology.hl7.org/ValueSet/v2-0180` +- `http://terminology.hl7.org/ValueSet/v2-0181` +- `http://terminology.hl7.org/ValueSet/v2-0183` +- `http://terminology.hl7.org/ValueSet/v2-0185` +- `http://terminology.hl7.org/ValueSet/v2-0187` +- `http://terminology.hl7.org/ValueSet/v2-0189` +- `http://terminology.hl7.org/ValueSet/v2-0190` +- `http://terminology.hl7.org/ValueSet/v2-0191` +- `http://terminology.hl7.org/ValueSet/v2-0193` +- `http://terminology.hl7.org/ValueSet/v2-0200` +- `http://terminology.hl7.org/ValueSet/v2-0201` +- `http://terminology.hl7.org/ValueSet/v2-0202` +- `http://terminology.hl7.org/ValueSet/v2-0203` +- `http://terminology.hl7.org/ValueSet/v2-0204` +- `http://terminology.hl7.org/ValueSet/v2-0205` +- `http://terminology.hl7.org/ValueSet/v2-0206` +- `http://terminology.hl7.org/ValueSet/v2-0207` +- `http://terminology.hl7.org/ValueSet/v2-0208` +- `http://terminology.hl7.org/ValueSet/v2-0209` +- `http://terminology.hl7.org/ValueSet/v2-0210` +- `http://terminology.hl7.org/ValueSet/v2-0211` +- `http://terminology.hl7.org/ValueSet/v2-0213` +- `http://terminology.hl7.org/ValueSet/v2-0214` +- `http://terminology.hl7.org/ValueSet/v2-0215` +- `http://terminology.hl7.org/ValueSet/v2-0216` +- `http://terminology.hl7.org/ValueSet/v2-0217` +- `http://terminology.hl7.org/ValueSet/v2-0220` +- `http://terminology.hl7.org/ValueSet/v2-0223` +- `http://terminology.hl7.org/ValueSet/v2-0224` +- `http://terminology.hl7.org/ValueSet/v2-0225` +- `http://terminology.hl7.org/ValueSet/v2-0227` +- `http://terminology.hl7.org/ValueSet/v2-0228` +- `http://terminology.hl7.org/ValueSet/v2-0229` +- `http://terminology.hl7.org/ValueSet/v2-0230` +- `http://terminology.hl7.org/ValueSet/v2-0231` +- `http://terminology.hl7.org/ValueSet/v2-0232` +- `http://terminology.hl7.org/ValueSet/v2-0234` +- `http://terminology.hl7.org/ValueSet/v2-0235` +- `http://terminology.hl7.org/ValueSet/v2-0236` +- `http://terminology.hl7.org/ValueSet/v2-0237` +- `http://terminology.hl7.org/ValueSet/v2-0238` +- `http://terminology.hl7.org/ValueSet/v2-0239` +- `http://terminology.hl7.org/ValueSet/v2-0240` +- `http://terminology.hl7.org/ValueSet/v2-0241` +- `http://terminology.hl7.org/ValueSet/v2-0242` +- `http://terminology.hl7.org/ValueSet/v2-0243` +- `http://terminology.hl7.org/ValueSet/v2-0247` +- `http://terminology.hl7.org/ValueSet/v2-0248` +- `http://terminology.hl7.org/ValueSet/v2-0250` +- `http://terminology.hl7.org/ValueSet/v2-0251` +- `http://terminology.hl7.org/ValueSet/v2-0252` +- `http://terminology.hl7.org/ValueSet/v2-0253` +- `http://terminology.hl7.org/ValueSet/v2-0254` +- `http://terminology.hl7.org/ValueSet/v2-0255` +- `http://terminology.hl7.org/ValueSet/v2-0256` +- `http://terminology.hl7.org/ValueSet/v2-0257` +- `http://terminology.hl7.org/ValueSet/v2-0258` +- `http://terminology.hl7.org/ValueSet/v2-0259` +- `http://terminology.hl7.org/ValueSet/v2-0260` +- `http://terminology.hl7.org/ValueSet/v2-0261` +- `http://terminology.hl7.org/ValueSet/v2-0262` +- `http://terminology.hl7.org/ValueSet/v2-0263` +- `http://terminology.hl7.org/ValueSet/v2-0265` +- `http://terminology.hl7.org/ValueSet/v2-0267` +- `http://terminology.hl7.org/ValueSet/v2-0268` +- `http://terminology.hl7.org/ValueSet/v2-0269` +- `http://terminology.hl7.org/ValueSet/v2-0270` +- `http://terminology.hl7.org/ValueSet/v2-0271` +- `http://terminology.hl7.org/ValueSet/v2-0272` +- `http://terminology.hl7.org/ValueSet/v2-0273` +- `http://terminology.hl7.org/ValueSet/v2-0275` +- `http://terminology.hl7.org/ValueSet/v2-0276` +- `http://terminology.hl7.org/ValueSet/v2-0277` +- `http://terminology.hl7.org/ValueSet/v2-0278` +- `http://terminology.hl7.org/ValueSet/v2-0279` +- `http://terminology.hl7.org/ValueSet/v2-0280` +- `http://terminology.hl7.org/ValueSet/v2-0281` +- `http://terminology.hl7.org/ValueSet/v2-0282` +- `http://terminology.hl7.org/ValueSet/v2-0283` +- `http://terminology.hl7.org/ValueSet/v2-0284` +- `http://terminology.hl7.org/ValueSet/v2-0286` +- `http://terminology.hl7.org/ValueSet/v2-0287` +- `http://terminology.hl7.org/ValueSet/v2-0290` +- `http://terminology.hl7.org/ValueSet/v2-0291` +- `http://terminology.hl7.org/ValueSet/v2-0292` +- `http://terminology.hl7.org/ValueSet/v2-0294` +- `http://terminology.hl7.org/ValueSet/v2-0298` +- `http://terminology.hl7.org/ValueSet/v2-0299` +- `http://terminology.hl7.org/ValueSet/v2-0301` +- `http://terminology.hl7.org/ValueSet/v2-0305` +- `http://terminology.hl7.org/ValueSet/v2-0309` +- `http://terminology.hl7.org/ValueSet/v2-0311` +- `http://terminology.hl7.org/ValueSet/v2-0315` +- `http://terminology.hl7.org/ValueSet/v2-0316` +- `http://terminology.hl7.org/ValueSet/v2-0317` +- `http://terminology.hl7.org/ValueSet/v2-0321` +- `http://terminology.hl7.org/ValueSet/v2-0322` +- `http://terminology.hl7.org/ValueSet/v2-0323` +- `http://terminology.hl7.org/ValueSet/v2-0324` +- `http://terminology.hl7.org/ValueSet/v2-0325` +- `http://terminology.hl7.org/ValueSet/v2-0326` +- `http://terminology.hl7.org/ValueSet/v2-0329` +- `http://terminology.hl7.org/ValueSet/v2-0330` +- `http://terminology.hl7.org/ValueSet/v2-0331` +- `http://terminology.hl7.org/ValueSet/v2-0332` +- `http://terminology.hl7.org/ValueSet/v2-0334` +- `http://terminology.hl7.org/ValueSet/v2-0335` +- `http://terminology.hl7.org/ValueSet/v2-0336` +- `http://terminology.hl7.org/ValueSet/v2-0337` +- `http://terminology.hl7.org/ValueSet/v2-0338` +- `http://terminology.hl7.org/ValueSet/v2-0339` +- `http://terminology.hl7.org/ValueSet/v2-0344` +- `http://terminology.hl7.org/ValueSet/v2-0350` +- `http://terminology.hl7.org/ValueSet/v2-0351` +- `http://terminology.hl7.org/ValueSet/v2-0353` +- `http://terminology.hl7.org/ValueSet/v2-0354` +- `http://terminology.hl7.org/ValueSet/v2-0355` +- `http://terminology.hl7.org/ValueSet/v2-0356` +- `http://terminology.hl7.org/ValueSet/v2-0357` +- `http://terminology.hl7.org/ValueSet/v2-0359` +- `http://terminology.hl7.org/ValueSet/v2-0363` +- `http://terminology.hl7.org/ValueSet/v2-0364` +- `http://terminology.hl7.org/ValueSet/v2-0365` +- `http://terminology.hl7.org/ValueSet/v2-0366` +- `http://terminology.hl7.org/ValueSet/v2-0367` +- `http://terminology.hl7.org/ValueSet/v2-0368` +- `http://terminology.hl7.org/ValueSet/v2-0369` +- `http://terminology.hl7.org/ValueSet/v2-0370` +- `http://terminology.hl7.org/ValueSet/v2-0371` +- `http://terminology.hl7.org/ValueSet/v2-0372` +- `http://terminology.hl7.org/ValueSet/v2-0373` +- `http://terminology.hl7.org/ValueSet/v2-0374` +- `http://terminology.hl7.org/ValueSet/v2-0375` +- `http://terminology.hl7.org/ValueSet/v2-0376` +- `http://terminology.hl7.org/ValueSet/v2-0377` +- `http://terminology.hl7.org/ValueSet/v2-0383` +- `http://terminology.hl7.org/ValueSet/v2-0384` +- `http://terminology.hl7.org/ValueSet/v2-0387` +- `http://terminology.hl7.org/ValueSet/v2-0388` +- `http://terminology.hl7.org/ValueSet/v2-0389` +- `http://terminology.hl7.org/ValueSet/v2-0392` +- `http://terminology.hl7.org/ValueSet/v2-0393` +- `http://terminology.hl7.org/ValueSet/v2-0394` +- `http://terminology.hl7.org/ValueSet/v2-0395` +- `http://terminology.hl7.org/ValueSet/v2-0396` +- `http://terminology.hl7.org/ValueSet/v2-0397` +- `http://terminology.hl7.org/ValueSet/v2-0398` +- `http://terminology.hl7.org/ValueSet/v2-0401` +- `http://terminology.hl7.org/ValueSet/v2-0402` +- `http://terminology.hl7.org/ValueSet/v2-0403` +- `http://terminology.hl7.org/ValueSet/v2-0404` +- `http://terminology.hl7.org/ValueSet/v2-0406` +- `http://terminology.hl7.org/ValueSet/v2-0409` +- `http://terminology.hl7.org/ValueSet/v2-0411` +- `http://terminology.hl7.org/ValueSet/v2-0415` +- `http://terminology.hl7.org/ValueSet/v2-0416` +- `http://terminology.hl7.org/ValueSet/v2-0417` +- `http://terminology.hl7.org/ValueSet/v2-0418` +- `http://terminology.hl7.org/ValueSet/v2-0421` +- `http://terminology.hl7.org/ValueSet/v2-0422` +- `http://terminology.hl7.org/ValueSet/v2-0423` +- `http://terminology.hl7.org/ValueSet/v2-0424` +- `http://terminology.hl7.org/ValueSet/v2-0425` +- `http://terminology.hl7.org/ValueSet/v2-0426` +- `http://terminology.hl7.org/ValueSet/v2-0427` +- `http://terminology.hl7.org/ValueSet/v2-0428` +- `http://terminology.hl7.org/ValueSet/v2-0429` +- `http://terminology.hl7.org/ValueSet/v2-0430` +- `http://terminology.hl7.org/ValueSet/v2-0431` +- `http://terminology.hl7.org/ValueSet/v2-0432` +- `http://terminology.hl7.org/ValueSet/v2-0433` +- `http://terminology.hl7.org/ValueSet/v2-0434` +- `http://terminology.hl7.org/ValueSet/v2-0435` +- `http://terminology.hl7.org/ValueSet/v2-0436` +- `http://terminology.hl7.org/ValueSet/v2-0437` +- `http://terminology.hl7.org/ValueSet/v2-0438` +- `http://terminology.hl7.org/ValueSet/v2-0440` +- `http://terminology.hl7.org/ValueSet/v2-0441` +- `http://terminology.hl7.org/ValueSet/v2-0442` +- `http://terminology.hl7.org/ValueSet/v2-0443` +- `http://terminology.hl7.org/ValueSet/v2-0444` +- `http://terminology.hl7.org/ValueSet/v2-0445` +- `http://terminology.hl7.org/ValueSet/v2-0450` +- `http://terminology.hl7.org/ValueSet/v2-0455` +- `http://terminology.hl7.org/ValueSet/v2-0456` +- `http://terminology.hl7.org/ValueSet/v2-0457` +- `http://terminology.hl7.org/ValueSet/v2-0459` +- `http://terminology.hl7.org/ValueSet/v2-0460` +- `http://terminology.hl7.org/ValueSet/v2-0465` +- `http://terminology.hl7.org/ValueSet/v2-0466` +- `http://terminology.hl7.org/ValueSet/v2-0468` +- `http://terminology.hl7.org/ValueSet/v2-0469` +- `http://terminology.hl7.org/ValueSet/v2-0470` +- `http://terminology.hl7.org/ValueSet/v2-0472` +- `http://terminology.hl7.org/ValueSet/v2-0473` +- `http://terminology.hl7.org/ValueSet/v2-0474` +- `http://terminology.hl7.org/ValueSet/v2-0475` +- `http://terminology.hl7.org/ValueSet/v2-0477` +- `http://terminology.hl7.org/ValueSet/v2-0478` +- `http://terminology.hl7.org/ValueSet/v2-0480` +- `http://terminology.hl7.org/ValueSet/v2-0482` +- `http://terminology.hl7.org/ValueSet/v2-0483` +- `http://terminology.hl7.org/ValueSet/v2-0484` +- `http://terminology.hl7.org/ValueSet/v2-0485` +- `http://terminology.hl7.org/ValueSet/v2-0487` +- `http://terminology.hl7.org/ValueSet/v2-0488` +- `http://terminology.hl7.org/ValueSet/v2-0489` +- `http://terminology.hl7.org/ValueSet/v2-0490` +- `http://terminology.hl7.org/ValueSet/v2-0491` +- `http://terminology.hl7.org/ValueSet/v2-0492` +- `http://terminology.hl7.org/ValueSet/v2-0493` +- `http://terminology.hl7.org/ValueSet/v2-0494` +- `http://terminology.hl7.org/ValueSet/v2-0495` +- `http://terminology.hl7.org/ValueSet/v2-0496` +- `http://terminology.hl7.org/ValueSet/v2-0497` +- `http://terminology.hl7.org/ValueSet/v2-0498` +- `http://terminology.hl7.org/ValueSet/v2-0499` +- `http://terminology.hl7.org/ValueSet/v2-0500` +- `http://terminology.hl7.org/ValueSet/v2-0501` +- `http://terminology.hl7.org/ValueSet/v2-0502` +- `http://terminology.hl7.org/ValueSet/v2-0503` +- `http://terminology.hl7.org/ValueSet/v2-0504` +- `http://terminology.hl7.org/ValueSet/v2-0505` +- `http://terminology.hl7.org/ValueSet/v2-0506` +- `http://terminology.hl7.org/ValueSet/v2-0507` +- `http://terminology.hl7.org/ValueSet/v2-0508` +- `http://terminology.hl7.org/ValueSet/v2-0510` +- `http://terminology.hl7.org/ValueSet/v2-0511` +- `http://terminology.hl7.org/ValueSet/v2-0513` +- `http://terminology.hl7.org/ValueSet/v2-0514` +- `http://terminology.hl7.org/ValueSet/v2-0516` +- `http://terminology.hl7.org/ValueSet/v2-0517` +- `http://terminology.hl7.org/ValueSet/v2-0518` +- `http://terminology.hl7.org/ValueSet/v2-0520` +- `http://terminology.hl7.org/ValueSet/v2-0523` +- `http://terminology.hl7.org/ValueSet/v2-0524` +- `http://terminology.hl7.org/ValueSet/v2-0527` +- `http://terminology.hl7.org/ValueSet/v2-0528` +- `http://terminology.hl7.org/ValueSet/v2-0529` +- `http://terminology.hl7.org/ValueSet/v2-0530` +- `http://terminology.hl7.org/ValueSet/v2-0532` +- `http://terminology.hl7.org/ValueSet/v2-0534` +- `http://terminology.hl7.org/ValueSet/v2-0535` +- `http://terminology.hl7.org/ValueSet/v2-0536` +- `http://terminology.hl7.org/ValueSet/v2-0538` +- `http://terminology.hl7.org/ValueSet/v2-0540` +- `http://terminology.hl7.org/ValueSet/v2-0544` +- `http://terminology.hl7.org/ValueSet/v2-0547` +- `http://terminology.hl7.org/ValueSet/v2-0548` +- `http://terminology.hl7.org/ValueSet/v2-0550` +- `http://terminology.hl7.org/ValueSet/v2-0553` +- `http://terminology.hl7.org/ValueSet/v2-0554` +- `http://terminology.hl7.org/ValueSet/v2-0555` +- `http://terminology.hl7.org/ValueSet/v2-0556` +- `http://terminology.hl7.org/ValueSet/v2-0557` +- `http://terminology.hl7.org/ValueSet/v2-0558` +- `http://terminology.hl7.org/ValueSet/v2-0559` +- `http://terminology.hl7.org/ValueSet/v2-0561` +- `http://terminology.hl7.org/ValueSet/v2-0562` +- `http://terminology.hl7.org/ValueSet/v2-0564` +- `http://terminology.hl7.org/ValueSet/v2-0565` +- `http://terminology.hl7.org/ValueSet/v2-0566` +- `http://terminology.hl7.org/ValueSet/v2-0569` +- `http://terminology.hl7.org/ValueSet/v2-0570` +- `http://terminology.hl7.org/ValueSet/v2-0571` +- `http://terminology.hl7.org/ValueSet/v2-0572` +- `http://terminology.hl7.org/ValueSet/v2-0615` +- `http://terminology.hl7.org/ValueSet/v2-0616` +- `http://terminology.hl7.org/ValueSet/v2-0617` +- `http://terminology.hl7.org/ValueSet/v2-0618` +- `http://terminology.hl7.org/ValueSet/v2-0625` +- `http://terminology.hl7.org/ValueSet/v2-0634` +- `http://terminology.hl7.org/ValueSet/v2-0642` +- `http://terminology.hl7.org/ValueSet/v2-0651` +- `http://terminology.hl7.org/ValueSet/v2-0653` +- `http://terminology.hl7.org/ValueSet/v2-0657` +- `http://terminology.hl7.org/ValueSet/v2-0659` +- `http://terminology.hl7.org/ValueSet/v2-0667` +- `http://terminology.hl7.org/ValueSet/v2-0669` +- `http://terminology.hl7.org/ValueSet/v2-0682` +- `http://terminology.hl7.org/ValueSet/v2-0702` +- `http://terminology.hl7.org/ValueSet/v2-0717` +- `http://terminology.hl7.org/ValueSet/v2-0719` +- `http://terminology.hl7.org/ValueSet/v2-0725` +- `http://terminology.hl7.org/ValueSet/v2-0728` +- `http://terminology.hl7.org/ValueSet/v2-0731` +- `http://terminology.hl7.org/ValueSet/v2-0734` +- `http://terminology.hl7.org/ValueSet/v2-0739` +- `http://terminology.hl7.org/ValueSet/v2-0742` +- `http://terminology.hl7.org/ValueSet/v2-0749` +- `http://terminology.hl7.org/ValueSet/v2-0755` +- `http://terminology.hl7.org/ValueSet/v2-0757` +- `http://terminology.hl7.org/ValueSet/v2-0759` +- `http://terminology.hl7.org/ValueSet/v2-0761` +- `http://terminology.hl7.org/ValueSet/v2-0763` +- `http://terminology.hl7.org/ValueSet/v2-0776` +- `http://terminology.hl7.org/ValueSet/v2-0778` +- `http://terminology.hl7.org/ValueSet/v2-0790` +- `http://terminology.hl7.org/ValueSet/v2-0793` +- `http://terminology.hl7.org/ValueSet/v2-0806` +- `http://terminology.hl7.org/ValueSet/v2-0818` +- `http://terminology.hl7.org/ValueSet/v2-0834` +- `http://terminology.hl7.org/ValueSet/v2-0868` +- `http://terminology.hl7.org/ValueSet/v2-0871` +- `http://terminology.hl7.org/ValueSet/v2-0881` +- `http://terminology.hl7.org/ValueSet/v2-0882` +- `http://terminology.hl7.org/ValueSet/v2-0894` +- `http://terminology.hl7.org/ValueSet/v2-0895` +- `http://terminology.hl7.org/ValueSet/v2-0904` +- `http://terminology.hl7.org/ValueSet/v2-0905` +- `http://terminology.hl7.org/ValueSet/v2-0906` +- `http://terminology.hl7.org/ValueSet/v2-0907` +- `http://terminology.hl7.org/ValueSet/v2-0909` +- `http://terminology.hl7.org/ValueSet/v2-0912` +- `http://terminology.hl7.org/ValueSet/v2-0914` +- `http://terminology.hl7.org/ValueSet/v2-0916` +- `http://terminology.hl7.org/ValueSet/v2-0917` +- `http://terminology.hl7.org/ValueSet/v2-0918` +- `http://terminology.hl7.org/ValueSet/v2-0919` +- `http://terminology.hl7.org/ValueSet/v2-0920` +- `http://terminology.hl7.org/ValueSet/v2-0921` +- `http://terminology.hl7.org/ValueSet/v2-0922` +- `http://terminology.hl7.org/ValueSet/v2-0923` +- `http://terminology.hl7.org/ValueSet/v2-0924` +- `http://terminology.hl7.org/ValueSet/v2-0925` +- `http://terminology.hl7.org/ValueSet/v2-0926` +- `http://terminology.hl7.org/ValueSet/v2-0927` +- `http://terminology.hl7.org/ValueSet/v2-0933` +- `http://terminology.hl7.org/ValueSet/v2-0935` +- `http://terminology.hl7.org/ValueSet/v2-2.1-0006` +- `http://terminology.hl7.org/ValueSet/v2-2.3.1-0360` +- `http://terminology.hl7.org/ValueSet/v2-2.4-0006` +- `http://terminology.hl7.org/ValueSet/v2-2.4-0391` +- `http://terminology.hl7.org/ValueSet/v2-2.6-0391` +- `http://terminology.hl7.org/ValueSet/v2-2.7-0360` +- `http://terminology.hl7.org/ValueSet/v2-4000` +- `http://terminology.hl7.org/ValueSet/v3-AcknowledgementCondition` +- `http://terminology.hl7.org/ValueSet/v3-AcknowledgementDetailCode` +- `http://terminology.hl7.org/ValueSet/v3-AcknowledgementDetailType` +- `http://terminology.hl7.org/ValueSet/v3-AcknowledgementType` +- `http://terminology.hl7.org/ValueSet/v3-ActClass` +- `http://terminology.hl7.org/ValueSet/v3-ActClassClinicalDocument` +- `http://terminology.hl7.org/ValueSet/v3-ActClassDocument` +- `http://terminology.hl7.org/ValueSet/v3-ActClassInvestigation` +- `http://terminology.hl7.org/ValueSet/v3-ActClassObservation` +- `http://terminology.hl7.org/ValueSet/v3-ActClassProcedure` +- `http://terminology.hl7.org/ValueSet/v3-ActClassROI` +- `http://terminology.hl7.org/ValueSet/v3-ActClassSupply` +- `http://terminology.hl7.org/ValueSet/v3-ActCode` +- `http://terminology.hl7.org/ValueSet/v3-ActConsentDirective` +- `http://terminology.hl7.org/ValueSet/v3-ActConsentType` +- `http://terminology.hl7.org/ValueSet/v3-ActCoverageTypeCode` +- `http://terminology.hl7.org/ValueSet/v3-ActEncounterCode` +- `http://terminology.hl7.org/ValueSet/v3-ActExposureLevelCode` +- `http://terminology.hl7.org/ValueSet/v3-ActIncidentCode` +- `http://terminology.hl7.org/ValueSet/v3-ActInvoiceElementModifier` +- `http://terminology.hl7.org/ValueSet/v3-ActInvoiceGroupCode` +- `http://terminology.hl7.org/ValueSet/v3-ActMood` +- `http://terminology.hl7.org/ValueSet/v3-ActMoodIntent` +- `http://terminology.hl7.org/ValueSet/v3-ActMoodPredicate` +- `http://terminology.hl7.org/ValueSet/v3-ActPharmacySupplyType` +- `http://terminology.hl7.org/ValueSet/v3-ActPriority` +- `http://terminology.hl7.org/ValueSet/v3-ActReason` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipCheckpoint` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipConditional` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipFulfills` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipHasComponent` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipJoin` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipPertains` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipSplit` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipSubset` +- `http://terminology.hl7.org/ValueSet/v3-ActRelationshipType` +- `http://terminology.hl7.org/ValueSet/v3-ActSite` +- `http://terminology.hl7.org/ValueSet/v3-ActStatus` +- `http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode` +- `http://terminology.hl7.org/ValueSet/v3-ActTaskCode` +- `http://terminology.hl7.org/ValueSet/v3-ActUSPrivacyLaw` +- `http://terminology.hl7.org/ValueSet/v3-ActUncertainty` +- `http://terminology.hl7.org/ValueSet/v3-AddressPartType` +- `http://terminology.hl7.org/ValueSet/v3-AddressUse` +- `http://terminology.hl7.org/ValueSet/v3-AdministrativeGender` +- `http://terminology.hl7.org/ValueSet/v3-AmericanIndianAlaskaNativeLanguages` +- `http://terminology.hl7.org/ValueSet/v3-Calendar` +- `http://terminology.hl7.org/ValueSet/v3-CalendarCycle` +- `http://terminology.hl7.org/ValueSet/v3-CalendarType` +- `http://terminology.hl7.org/ValueSet/v3-Charset` +- `http://terminology.hl7.org/ValueSet/v3-CodingRationale` +- `http://terminology.hl7.org/ValueSet/v3-CommunicationFunctionType` +- `http://terminology.hl7.org/ValueSet/v3-Compartment` +- `http://terminology.hl7.org/ValueSet/v3-CompressionAlgorithm` +- `http://terminology.hl7.org/ValueSet/v3-Confidentiality` +- `http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification` +- `http://terminology.hl7.org/ValueSet/v3-ContainerCap` +- `http://terminology.hl7.org/ValueSet/v3-ContainerSeparator` +- `http://terminology.hl7.org/ValueSet/v3-ContentProcessingMode` +- `http://terminology.hl7.org/ValueSet/v3-ContextControl` +- `http://terminology.hl7.org/ValueSet/v3-DataOperation` +- `http://terminology.hl7.org/ValueSet/v3-Dentition` +- `http://terminology.hl7.org/ValueSet/v3-DeviceAlertLevel` +- `http://terminology.hl7.org/ValueSet/v3-DocumentCompletion` +- `http://terminology.hl7.org/ValueSet/v3-DocumentSectionType` +- `http://terminology.hl7.org/ValueSet/v3-DocumentStorage` +- `http://terminology.hl7.org/ValueSet/v3-EducationLevel` +- `http://terminology.hl7.org/ValueSet/v3-EmployeeJobClass` +- `http://terminology.hl7.org/ValueSet/v3-EncounterAdmissionSource` +- `http://terminology.hl7.org/ValueSet/v3-EncounterSpecialCourtesy` +- `http://terminology.hl7.org/ValueSet/v3-EntityClass` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassDevice` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassLivingSubject` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassManufacturedMaterial` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassOrganization` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassPlace` +- `http://terminology.hl7.org/ValueSet/v3-EntityClassRoot` +- `http://terminology.hl7.org/ValueSet/v3-EntityCode` +- `http://terminology.hl7.org/ValueSet/v3-EntityDeterminer` +- `http://terminology.hl7.org/ValueSet/v3-EntityDeterminerDetermined` +- `http://terminology.hl7.org/ValueSet/v3-EntityHandling` +- `http://terminology.hl7.org/ValueSet/v3-EntityNamePartQualifier` +- `http://terminology.hl7.org/ValueSet/v3-EntityNamePartQualifierR2` +- `http://terminology.hl7.org/ValueSet/v3-EntityNamePartType` +- `http://terminology.hl7.org/ValueSet/v3-EntityNamePartTypeR2` +- `http://terminology.hl7.org/ValueSet/v3-EntityNameUse` +- `http://terminology.hl7.org/ValueSet/v3-EntityNameUseR2` +- `http://terminology.hl7.org/ValueSet/v3-EntityRisk` +- `http://terminology.hl7.org/ValueSet/v3-EntityStatus` +- `http://terminology.hl7.org/ValueSet/v3-EquipmentAlertLevel` +- `http://terminology.hl7.org/ValueSet/v3-Ethnicity` +- `http://terminology.hl7.org/ValueSet/v3-ExposureMode` +- `http://terminology.hl7.org/ValueSet/v3-FamilyMember` +- `http://terminology.hl7.org/ValueSet/v3-GTSAbbreviation` +- `http://terminology.hl7.org/ValueSet/v3-GenderStatus` +- `http://terminology.hl7.org/ValueSet/v3-GeneralPurposeOfUse` +- `http://terminology.hl7.org/ValueSet/v3-HL7ContextConductionStyle` +- `http://terminology.hl7.org/ValueSet/v3-HL7StandardVersionCode` +- `http://terminology.hl7.org/ValueSet/v3-HL7UpdateMode` +- `http://terminology.hl7.org/ValueSet/v3-HtmlLinkType` +- `http://terminology.hl7.org/ValueSet/v3-HumanLanguage` +- `http://terminology.hl7.org/ValueSet/v3-IdentifierReliability` +- `http://terminology.hl7.org/ValueSet/v3-IdentifierScope` +- `http://terminology.hl7.org/ValueSet/v3-InformationSensitivityPolicy` +- `http://terminology.hl7.org/ValueSet/v3-IntegrityCheckAlgorithm` +- `http://terminology.hl7.org/ValueSet/v3-LanguageAbilityMode` +- `http://terminology.hl7.org/ValueSet/v3-LanguageAbilityProficiency` +- `http://terminology.hl7.org/ValueSet/v3-LivingArrangement` +- `http://terminology.hl7.org/ValueSet/v3-LocalMarkupIgnore` +- `http://terminology.hl7.org/ValueSet/v3-LocalRemoteControlState` +- `http://terminology.hl7.org/ValueSet/v3-ManagedParticipationStatus` +- `http://terminology.hl7.org/ValueSet/v3-MapRelationship` +- `http://terminology.hl7.org/ValueSet/v3-MaritalStatus` +- `http://terminology.hl7.org/ValueSet/v3-MessageWaitingPriority` +- `http://terminology.hl7.org/ValueSet/v3-MilitaryRoleType` +- `http://terminology.hl7.org/ValueSet/v3-ModifyIndicator` +- `http://terminology.hl7.org/ValueSet/v3-NullFlavor` +- `http://terminology.hl7.org/ValueSet/v3-ObligationPolicy` +- `http://terminology.hl7.org/ValueSet/v3-ObservationCategory` +- `http://terminology.hl7.org/ValueSet/v3-ObservationInterpretation` +- `http://terminology.hl7.org/ValueSet/v3-ObservationMethod` +- `http://terminology.hl7.org/ValueSet/v3-ObservationType` +- `http://terminology.hl7.org/ValueSet/v3-ObservationValue` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationFunction` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationIndirectTarget` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationInformationGenerator` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationInformationTranscriber` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationMode` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationPhysicalPerformer` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationSignature` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationTargetDirect` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationTargetLocation` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationTargetSubject` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationType` +- `http://terminology.hl7.org/ValueSet/v3-ParticipationVerifier` +- `http://terminology.hl7.org/ValueSet/v3-PatientImportance` +- `http://terminology.hl7.org/ValueSet/v3-PaymentTerms` +- `http://terminology.hl7.org/ValueSet/v3-PersonDisabilityType` +- `http://terminology.hl7.org/ValueSet/v3-PersonalRelationshipRoleType` +- `http://terminology.hl7.org/ValueSet/v3-ProbabilityDistributionType` +- `http://terminology.hl7.org/ValueSet/v3-ProcessingID` +- `http://terminology.hl7.org/ValueSet/v3-ProcessingMode` +- `http://terminology.hl7.org/ValueSet/v3-ProvenanceEventCurrentState` +- `http://terminology.hl7.org/ValueSet/v3-ProvenanceEventCurrentState-AS` +- `http://terminology.hl7.org/ValueSet/v3-ProvenanceEventCurrentState-DC` +- `http://terminology.hl7.org/ValueSet/v3-PurposeOfUse` +- `http://terminology.hl7.org/ValueSet/v3-QueryParameterValue` +- `http://terminology.hl7.org/ValueSet/v3-QueryPriority` +- `http://terminology.hl7.org/ValueSet/v3-QueryRequestLimit` +- `http://terminology.hl7.org/ValueSet/v3-QueryResponse` +- `http://terminology.hl7.org/ValueSet/v3-QueryStatusCode` +- `http://terminology.hl7.org/ValueSet/v3-Race` +- `http://terminology.hl7.org/ValueSet/v3-RefrainPolicy` +- `http://terminology.hl7.org/ValueSet/v3-RelationalOperator` +- `http://terminology.hl7.org/ValueSet/v3-RelationshipConjunction` +- `http://terminology.hl7.org/ValueSet/v3-ReligiousAffiliation` +- `http://terminology.hl7.org/ValueSet/v3-ResponseLevel` +- `http://terminology.hl7.org/ValueSet/v3-ResponseModality` +- `http://terminology.hl7.org/ValueSet/v3-ResponseMode` +- `http://terminology.hl7.org/ValueSet/v3-RoleClass` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassAgent` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassAssociative` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassManufacturedProduct` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassMutualRelationship` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassPartitive` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassPassive` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassRelationshipFormal` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassRoot` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassServiceDeliveryLocation` +- `http://terminology.hl7.org/ValueSet/v3-RoleClassSpecimen` +- `http://terminology.hl7.org/ValueSet/v3-RoleCode` +- `http://terminology.hl7.org/ValueSet/v3-RoleLinkStatus` +- `http://terminology.hl7.org/ValueSet/v3-RoleLinkType` +- `http://terminology.hl7.org/ValueSet/v3-RoleStatus` +- `http://terminology.hl7.org/ValueSet/v3-RouteOfAdministration` +- `http://terminology.hl7.org/ValueSet/v3-SecurityControlObservationValue` +- `http://terminology.hl7.org/ValueSet/v3-SecurityIntegrityObservationValue` +- `http://terminology.hl7.org/ValueSet/v3-SecurityPolicy` +- `http://terminology.hl7.org/ValueSet/v3-Sequencing` +- `http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType` +- `http://terminology.hl7.org/ValueSet/v3-SetOperator` +- `http://terminology.hl7.org/ValueSet/v3-SeverityObservation` +- `http://terminology.hl7.org/ValueSet/v3-SpecimenType` +- `http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason` +- `http://terminology.hl7.org/ValueSet/v3-SubstitutionCondition` +- `http://terminology.hl7.org/ValueSet/v3-TableCellHorizontalAlign` +- `http://terminology.hl7.org/ValueSet/v3-TableCellScope` +- `http://terminology.hl7.org/ValueSet/v3-TableCellVerticalAlign` +- `http://terminology.hl7.org/ValueSet/v3-TableFrame` +- `http://terminology.hl7.org/ValueSet/v3-TableRules` +- `http://terminology.hl7.org/ValueSet/v3-TargetAwareness` +- `http://terminology.hl7.org/ValueSet/v3-TelecommunicationCapabilities` +- `http://terminology.hl7.org/ValueSet/v3-TimingEvent` +- `http://terminology.hl7.org/ValueSet/v3-TransmissionRelationshipTypeCode` +- `http://terminology.hl7.org/ValueSet/v3-TribalEntityUS` +- `http://terminology.hl7.org/ValueSet/v3-VaccineManufacturer` +- `http://terminology.hl7.org/ValueSet/v3-VerificationMethod` +- `http://terminology.hl7.org/ValueSet/v3-WorkClassificationODH` +- `http://terminology.hl7.org/ValueSet/v3-WorkScheduleODH` +- `http://terminology.hl7.org/ValueSet/v3-employmentStatusODH` +- `http://terminology.hl7.org/ValueSet/v3-hl7ApprovalStatus` +- `http://terminology.hl7.org/ValueSet/v3-hl7CMETAttribution` +- `http://terminology.hl7.org/ValueSet/v3-hl7ITSType` +- `http://terminology.hl7.org/ValueSet/v3-hl7ITSVersionCode` +- `http://terminology.hl7.org/ValueSet/v3-hl7PublishingDomain` +- `http://terminology.hl7.org/ValueSet/v3-hl7PublishingSection` +- `http://terminology.hl7.org/ValueSet/v3-hl7PublishingSubSection` +- `http://terminology.hl7.org/ValueSet/v3-hl7Realm` +- `http://terminology.hl7.org/ValueSet/v3-hl7V3Conformance` +- `http://terminology.hl7.org/ValueSet/v3-hl7VoteResolution` +- `http://terminology.hl7.org/ValueSet/v3-orderableDrugForm` +- `http://terminology.hl7.org/ValueSet/v3-policyHolderRole` +- `http://terminology.hl7.org/ValueSet/v3-styleType` +- `http://terminology.hl7.org/ValueSet/v3-substanceAdminSubstitution` +- `http://terminology.hl7.org/ValueSet/v3-triggerEventID` +- `http://terminology.hl7.org/ValueSet/v3-xBasicConfidentialityKind` + +## Package: `shared` + +### Skipped Canonicals + +- `urn:fhir:binding:AccidentType` +- `urn:fhir:binding:AccountStatus` +- `urn:fhir:binding:AccountType` +- `urn:fhir:binding:ActionCardinalityBehavior` +- `urn:fhir:binding:ActionConditionKind` +- `urn:fhir:binding:ActionGroupingBehavior` +- `urn:fhir:binding:ActionParticipantRole` +- `urn:fhir:binding:ActionParticipantType` +- `urn:fhir:binding:ActionPrecheckBehavior` +- `urn:fhir:binding:ActionRelationshipType` +- `urn:fhir:binding:ActionRequiredBehavior` +- `urn:fhir:binding:ActionSelectionBehavior` +- `urn:fhir:binding:ActionType` +- `urn:fhir:binding:ActivityDefinitionKind` +- `urn:fhir:binding:ActivityDefinitionType` +- `urn:fhir:binding:ActivityParticipantRole` +- `urn:fhir:binding:ActivityParticipantType` +- `urn:fhir:binding:Adjudication` +- `urn:fhir:binding:AdjudicationError` +- `urn:fhir:binding:AdjudicationReason` +- `urn:fhir:binding:AdjunctDiagnosis` +- `urn:fhir:binding:AdverseEventActuality` +- `urn:fhir:binding:AdverseEventCategory` +- `urn:fhir:binding:AdverseEventCausalityAssessment` +- `urn:fhir:binding:AdverseEventCausalityMethod` +- `urn:fhir:binding:AdverseEventOutcome` +- `urn:fhir:binding:AdverseEventSeriousness` +- `urn:fhir:binding:AdverseEventSeverity` +- `urn:fhir:binding:AdverseEventType` +- `urn:fhir:binding:AggregationMode` +- `urn:fhir:binding:AllergyIntoleranceCategory` +- `urn:fhir:binding:AllergyIntoleranceClinicalStatus` +- `urn:fhir:binding:AllergyIntoleranceCode` +- `urn:fhir:binding:AllergyIntoleranceCriticality` +- `urn:fhir:binding:AllergyIntoleranceSeverity` +- `urn:fhir:binding:AllergyIntoleranceType` +- `urn:fhir:binding:AllergyIntoleranceVerificationStatus` +- `urn:fhir:binding:AppointmentStatus` +- `urn:fhir:binding:ApptReason` +- `urn:fhir:binding:AssertionDirectionType` +- `urn:fhir:binding:AssertionOperatorType` +- `urn:fhir:binding:AssertionResponseTypes` +- `urn:fhir:binding:AssetAvailabilityType` +- `urn:fhir:binding:AuditAgentRole` +- `urn:fhir:binding:AuditAgentType` +- `urn:fhir:binding:AuditEventAction` +- `urn:fhir:binding:AuditEventAgentNetworkType` +- `urn:fhir:binding:AuditEventEntityLifecycle` +- `urn:fhir:binding:AuditEventEntityRole` +- `urn:fhir:binding:AuditEventEntityType` +- `urn:fhir:binding:AuditEventOutcome` +- `urn:fhir:binding:AuditEventSourceType` +- `urn:fhir:binding:AuditEventSubType` +- `urn:fhir:binding:AuditEventType` +- `urn:fhir:binding:AuditPurposeOfUse` +- `urn:fhir:binding:AuthSupporting` +- `urn:fhir:binding:BasicResourceType` +- `urn:fhir:binding:BenefitCategory` +- `urn:fhir:binding:BenefitCostApplicability` +- `urn:fhir:binding:BenefitNetwork` +- `urn:fhir:binding:BenefitTerm` +- `urn:fhir:binding:BenefitType` +- `urn:fhir:binding:BenefitUnit` +- `urn:fhir:binding:BindingStrength` +- `urn:fhir:binding:BiologicallyDerivedProductCategory` +- `urn:fhir:binding:BiologicallyDerivedProductProcedure` +- `urn:fhir:binding:BiologicallyDerivedProductStatus` +- `urn:fhir:binding:BiologicallyDerivedProductStorageScale` +- `urn:fhir:binding:BodyLengthUnits` +- `urn:fhir:binding:BodySite` +- `urn:fhir:binding:BodyStructureCode` +- `urn:fhir:binding:BodyStructureQualifier` +- `urn:fhir:binding:BodyTempUnits` +- `urn:fhir:binding:BodyWeightUnits` +- `urn:fhir:binding:CapabilityStatementKind` +- `urn:fhir:binding:CarePlanActivityKind` +- `urn:fhir:binding:CarePlanActivityOutcome` +- `urn:fhir:binding:CarePlanActivityReason` +- `urn:fhir:binding:CarePlanActivityStatus` +- `urn:fhir:binding:CarePlanActivityType` +- `urn:fhir:binding:CarePlanCategory` +- `urn:fhir:binding:CarePlanIntent` +- `urn:fhir:binding:CarePlanStatus` +- `urn:fhir:binding:CareTeamCategory` +- `urn:fhir:binding:CareTeamParticipantRole` +- `urn:fhir:binding:CareTeamReason` +- `urn:fhir:binding:CareTeamRole` +- `urn:fhir:binding:CareTeamStatus` +- `urn:fhir:binding:CatalogEntryRelationType` +- `urn:fhir:binding:CatalogType` +- `urn:fhir:binding:CertaintySubcomponentRating` +- `urn:fhir:binding:CertaintySubcomponentType` +- `urn:fhir:binding:ChargeItemCode` +- `urn:fhir:binding:ChargeItemDefinitionCode` +- `urn:fhir:binding:ChargeItemDefinitionPriceComponentType` +- `urn:fhir:binding:ChargeItemPerformerFunction` +- `urn:fhir:binding:ChargeItemReason` +- `urn:fhir:binding:ChargeItemStatus` +- `urn:fhir:binding:ClaimResponseStatus` +- `urn:fhir:binding:ClaimStatus` +- `urn:fhir:binding:ClaimSubType` +- `urn:fhir:binding:ClaimType` +- `urn:fhir:binding:ClinicalImpressionPrognosis` +- `urn:fhir:binding:ClinicalImpressionStatus` +- `urn:fhir:binding:CodeSearchSupport` +- `urn:fhir:binding:CodeSystemContentMode` +- `urn:fhir:binding:CodeSystemHierarchyMeaning` +- `urn:fhir:binding:CollectedSpecimenType` +- `urn:fhir:binding:CommunicationCategory` +- `urn:fhir:binding:CommunicationMedium` +- `urn:fhir:binding:CommunicationNotDoneReason` +- `urn:fhir:binding:CommunicationPriority` +- `urn:fhir:binding:CommunicationReason` +- `urn:fhir:binding:CommunicationRequestStatus` +- `urn:fhir:binding:CommunicationStatus` +- `urn:fhir:binding:CommunicationTopic` +- `urn:fhir:binding:CompartmentCode` +- `urn:fhir:binding:CompartmentType` +- `urn:fhir:binding:CompositeMeasureScoring` +- `urn:fhir:binding:CompositionAttestationMode` +- `urn:fhir:binding:CompositionSectionType` +- `urn:fhir:binding:CompositionStatus` +- `urn:fhir:binding:ConceptDesignationUse` +- `urn:fhir:binding:ConceptMapEquivalence` +- `urn:fhir:binding:ConceptMapGroupUnmappedMode` +- `urn:fhir:binding:ConditionCategory` +- `urn:fhir:binding:ConditionClinicalStatus` +- `urn:fhir:binding:ConditionCode` +- `urn:fhir:binding:ConditionKind` +- `urn:fhir:binding:ConditionOutcome` +- `urn:fhir:binding:ConditionSeverity` +- `urn:fhir:binding:ConditionStage` +- `urn:fhir:binding:ConditionStageType` +- `urn:fhir:binding:ConditionVerificationStatus` +- `urn:fhir:binding:ConditionalDeleteStatus` +- `urn:fhir:binding:ConditionalReadStatus` +- `urn:fhir:binding:ConsentAction` +- `urn:fhir:binding:ConsentActorRole` +- `urn:fhir:binding:ConsentCategory` +- `urn:fhir:binding:ConsentContentClass` +- `urn:fhir:binding:ConsentContentCode` +- `urn:fhir:binding:ConsentDataMeaning` +- `urn:fhir:binding:ConsentPolicyRule` +- `urn:fhir:binding:ConsentProvisionType` +- `urn:fhir:binding:ConsentScope` +- `urn:fhir:binding:ConsentState` +- `urn:fhir:binding:ConstraintSeverity` +- `urn:fhir:binding:ContactPartyType` +- `urn:fhir:binding:ContainerCap` +- `urn:fhir:binding:ContainerMaterial` +- `urn:fhir:binding:ContainerType` +- `urn:fhir:binding:ContractAction` +- `urn:fhir:binding:ContractActionPerformerRole` +- `urn:fhir:binding:ContractActionPerformerType` +- `urn:fhir:binding:ContractActionReason` +- `urn:fhir:binding:ContractActionStatus` +- `urn:fhir:binding:ContractActorRole` +- `urn:fhir:binding:ContractAssetContext` +- `urn:fhir:binding:ContractAssetScope` +- `urn:fhir:binding:ContractAssetSubtype` +- `urn:fhir:binding:ContractAssetType` +- `urn:fhir:binding:ContractContentDerivative` +- `urn:fhir:binding:ContractDecisionMode` +- `urn:fhir:binding:ContractDecisionType` +- `urn:fhir:binding:ContractDefinitionSubtype` +- `urn:fhir:binding:ContractDefinitionType` +- `urn:fhir:binding:ContractExpiration` +- `urn:fhir:binding:ContractLegalState` +- `urn:fhir:binding:ContractPartyRole` +- `urn:fhir:binding:ContractPublicationStatus` +- `urn:fhir:binding:ContractScope` +- `urn:fhir:binding:ContractSecurityCategory` +- `urn:fhir:binding:ContractSecurityClassification` +- `urn:fhir:binding:ContractSecurityControl` +- `urn:fhir:binding:ContractSignerType` +- `urn:fhir:binding:ContractStatus` +- `urn:fhir:binding:ContractSubtype` +- `urn:fhir:binding:ContractTermSubType` +- `urn:fhir:binding:ContractTermType` +- `urn:fhir:binding:ContractType` +- `urn:fhir:binding:CopayTypes` +- `urn:fhir:binding:CoverageClass` +- `urn:fhir:binding:CoverageFinancialException` +- `urn:fhir:binding:CoverageStatus` +- `urn:fhir:binding:CoverageType` +- `urn:fhir:binding:DICOMMediaType` +- `urn:fhir:binding:DefinitionTopic` +- `urn:fhir:binding:DetectedIssueCategory` +- `urn:fhir:binding:DetectedIssueEvidenceCode` +- `urn:fhir:binding:DetectedIssueMitigationAction` +- `urn:fhir:binding:DetectedIssueSeverity` +- `urn:fhir:binding:DetectedIssueStatus` +- `urn:fhir:binding:DeviceActionKind` +- `urn:fhir:binding:DeviceKind` +- `urn:fhir:binding:DeviceMetricCalibrationState` +- `urn:fhir:binding:DeviceMetricCalibrationType` +- `urn:fhir:binding:DeviceMetricCategory` +- `urn:fhir:binding:DeviceMetricColor` +- `urn:fhir:binding:DeviceMetricOperationalStatus` +- `urn:fhir:binding:DeviceNameType` +- `urn:fhir:binding:DeviceRequestParticipantRole` +- `urn:fhir:binding:DeviceRequestReason` +- `urn:fhir:binding:DeviceRequestStatus` +- `urn:fhir:binding:DeviceType` +- `urn:fhir:binding:DeviceUseStatementStatus` +- `urn:fhir:binding:DiagnosisOnAdmission` +- `urn:fhir:binding:DiagnosisRelatedGroup` +- `urn:fhir:binding:DiagnosisType` +- `urn:fhir:binding:DiagnosticReportCodes` +- `urn:fhir:binding:DiagnosticReportStatus` +- `urn:fhir:binding:DiagnosticServiceSection` +- `urn:fhir:binding:DiscriminatorType` +- `urn:fhir:binding:DocumentC80Class` +- `urn:fhir:binding:DocumentC80FacilityType` +- `urn:fhir:binding:DocumentC80PracticeSetting` +- `urn:fhir:binding:DocumentC80Type` +- `urn:fhir:binding:DocumentCategory` +- `urn:fhir:binding:DocumentConfidentiality` +- `urn:fhir:binding:DocumentEventType` +- `urn:fhir:binding:DocumentFormat` +- `urn:fhir:binding:DocumentMode` +- `urn:fhir:binding:DocumentReferenceStatus` +- `urn:fhir:binding:DocumentRelationshipType` +- `urn:fhir:binding:DocumentType` +- `urn:fhir:binding:EffectEstimateType` +- `urn:fhir:binding:ElementDefinitionCode` +- `urn:fhir:binding:EligibilityRequestPurpose` +- `urn:fhir:binding:EligibilityRequestStatus` +- `urn:fhir:binding:EligibilityResponsePurpose` +- `urn:fhir:binding:EligibilityResponseStatus` +- `urn:fhir:binding:EnableWhenBehavior` +- `urn:fhir:binding:EndpointStatus` +- `urn:fhir:binding:EnrollmentRequestStatus` +- `urn:fhir:binding:EnrollmentResponseStatus` +- `urn:fhir:binding:EnteralFormulaAdditiveType` +- `urn:fhir:binding:EnteralFormulaType` +- `urn:fhir:binding:EnteralRouteOfAdministration` +- `urn:fhir:binding:EpisodeOfCareStatus` +- `urn:fhir:binding:EpisodeOfCareType` +- `urn:fhir:binding:EvaluationDoseStatus` +- `urn:fhir:binding:EvaluationDoseStatusReason` +- `urn:fhir:binding:EvaluationTargetDisease` +- `urn:fhir:binding:EventCapabilityMode` +- `urn:fhir:binding:EventPerformerFunction` +- `urn:fhir:binding:EventReason` +- `urn:fhir:binding:EvidenceVariableType` +- `urn:fhir:binding:EvidenceVariantState` +- `urn:fhir:binding:ExampleScenarioActorType` +- `urn:fhir:binding:ExplanationOfBenefitStatus` +- `urn:fhir:binding:ExposureState` +- `urn:fhir:binding:ExtensionContextType` +- `urn:fhir:binding:FHIRDefinedType` +- `urn:fhir:binding:FHIRDefinedTypeExt` +- `urn:fhir:binding:FHIRDeviceStatus` +- `urn:fhir:binding:FHIRDeviceStatusReason` +- `urn:fhir:binding:FHIRResourceType` +- `urn:fhir:binding:FHIRSubstanceStatus` +- `urn:fhir:binding:FHIRVersion` +- `urn:fhir:binding:FamilialRelationship` +- `urn:fhir:binding:FamilyHistoryAbsentReason` +- `urn:fhir:binding:FamilyHistoryReason` +- `urn:fhir:binding:FamilyHistoryStatus` +- `urn:fhir:binding:FilterOperator` +- `urn:fhir:binding:FlagCategory` +- `urn:fhir:binding:FlagCode` +- `urn:fhir:binding:FlagStatus` +- `urn:fhir:binding:FluidConsistencyType` +- `urn:fhir:binding:FoodType` +- `urn:fhir:binding:Forms` +- `urn:fhir:binding:FundingSource` +- `urn:fhir:binding:FundsReserve` +- `urn:fhir:binding:GoalAchievementStatus` +- `urn:fhir:binding:GoalAddresses` +- `urn:fhir:binding:GoalCategory` +- `urn:fhir:binding:GoalDescription` +- `urn:fhir:binding:GoalLifecycleStatus` +- `urn:fhir:binding:GoalOutcome` +- `urn:fhir:binding:GoalPriority` +- `urn:fhir:binding:GoalStartEvent` +- `urn:fhir:binding:GoalTargetMeasure` +- `urn:fhir:binding:GraphCompartmentRule` +- `urn:fhir:binding:GraphCompartmentUse` +- `urn:fhir:binding:GroupMeasure` +- `urn:fhir:binding:GroupType` +- `urn:fhir:binding:GuidanceResponseStatus` +- `urn:fhir:binding:GuidePageGeneration` +- `urn:fhir:binding:GuideParameterCode` +- `urn:fhir:binding:HandlingConditionSet` +- `urn:fhir:binding:IdentityAssuranceLevel` +- `urn:fhir:binding:ImagingModality` +- `urn:fhir:binding:ImagingProcedureCode` +- `urn:fhir:binding:ImagingReason` +- `urn:fhir:binding:ImagingStudyStatus` +- `urn:fhir:binding:ImmunizationEvaluationStatus` +- `urn:fhir:binding:ImmunizationFunction` +- `urn:fhir:binding:ImmunizationReason` +- `urn:fhir:binding:ImmunizationRecommendationDateCriterion` +- `urn:fhir:binding:ImmunizationRecommendationReason` +- `urn:fhir:binding:ImmunizationRecommendationStatus` +- `urn:fhir:binding:ImmunizationReportOrigin` +- `urn:fhir:binding:ImmunizationRoute` +- `urn:fhir:binding:ImmunizationSite` +- `urn:fhir:binding:ImmunizationStatus` +- `urn:fhir:binding:ImmunizationStatusReason` +- `urn:fhir:binding:InformationCategory` +- `urn:fhir:binding:InformationCode` +- `urn:fhir:binding:InsurancePlanType` +- `urn:fhir:binding:IntendedSpecimenType` +- `urn:fhir:binding:InvestigationGroupType` +- `urn:fhir:binding:InvoicePriceComponentType` +- `urn:fhir:binding:InvoiceStatus` +- `urn:fhir:binding:Jurisdiction` +- `urn:fhir:binding:LDLCodes` +- `urn:fhir:binding:LOINC LL379-9 answerlist` +- `urn:fhir:binding:Laterality` +- `urn:fhir:binding:LibraryType` +- `urn:fhir:binding:LinkageType` +- `urn:fhir:binding:ListEmptyReason` +- `urn:fhir:binding:ListItemFlag` +- `urn:fhir:binding:ListMode` +- `urn:fhir:binding:ListOrder` +- `urn:fhir:binding:ListPurpose` +- `urn:fhir:binding:ListStatus` +- `urn:fhir:binding:Manifestation` +- `urn:fhir:binding:ManifestationOrSymptom` +- `urn:fhir:binding:MeasureDataUsage` +- `urn:fhir:binding:MeasureImprovementNotation` +- `urn:fhir:binding:MeasurePopulation` +- `urn:fhir:binding:MeasurePopulationType` +- `urn:fhir:binding:MeasureReportStatus` +- `urn:fhir:binding:MeasureReportType` +- `urn:fhir:binding:MeasureScoring` +- `urn:fhir:binding:MeasureType` +- `urn:fhir:binding:MediaModality` +- `urn:fhir:binding:MediaReason` +- `urn:fhir:binding:MediaStatus` +- `urn:fhir:binding:MediaType` +- `urn:fhir:binding:MediaView` +- `urn:fhir:binding:MedicationAdministrationCategory` +- `urn:fhir:binding:MedicationAdministrationNegationReason` +- `urn:fhir:binding:MedicationAdministrationPerformerFunction` +- `urn:fhir:binding:MedicationAdministrationReason` +- `urn:fhir:binding:MedicationAdministrationStatus` +- `urn:fhir:binding:MedicationCharacteristic` +- `urn:fhir:binding:MedicationDispenseCategory` +- `urn:fhir:binding:MedicationDispensePerformerFunction` +- `urn:fhir:binding:MedicationDispenseStatus` +- `urn:fhir:binding:MedicationDispenseType` +- `urn:fhir:binding:MedicationForm` +- `urn:fhir:binding:MedicationFormalRepresentation` +- `urn:fhir:binding:MedicationIntendedSubstitutionReason` +- `urn:fhir:binding:MedicationIntendedSubstitutionType` +- `urn:fhir:binding:MedicationKnowledgeStatus` +- `urn:fhir:binding:MedicationPackageType` +- `urn:fhir:binding:MedicationReason` +- `urn:fhir:binding:MedicationRequestCategory` +- `urn:fhir:binding:MedicationRequestCourseOfTherapy` +- `urn:fhir:binding:MedicationRequestIntent` +- `urn:fhir:binding:MedicationRequestPerformerType` +- `urn:fhir:binding:MedicationRequestPriority` +- `urn:fhir:binding:MedicationRequestReason` +- `urn:fhir:binding:MedicationRequestStatus` +- `urn:fhir:binding:MedicationRequestStatusReason` +- `urn:fhir:binding:MedicationRoute` +- `urn:fhir:binding:MedicationStatementCategory` +- `urn:fhir:binding:MedicationStatementStatus` +- `urn:fhir:binding:MedicationStatementStatusReason` +- `urn:fhir:binding:MedicationStatus` +- `urn:fhir:binding:MessageSignificanceCategory` +- `urn:fhir:binding:MessageTransport` +- `urn:fhir:binding:MetricType` +- `urn:fhir:binding:MetricUnit` +- `urn:fhir:binding:MissingReason` +- `urn:fhir:binding:Modifiers` +- `urn:fhir:binding:NamingSystemIdentifierType` +- `urn:fhir:binding:NamingSystemType` +- `urn:fhir:binding:NoteType` +- `urn:fhir:binding:NutrientModifier` +- `urn:fhir:binding:NutritiionOrderIntent` +- `urn:fhir:binding:NutritionOrderStatus` +- `urn:fhir:binding:ObservationCategory` +- `urn:fhir:binding:ObservationCode` +- `urn:fhir:binding:ObservationDataType` +- `urn:fhir:binding:ObservationInterpretation` +- `urn:fhir:binding:ObservationMethod` +- `urn:fhir:binding:ObservationRangeAppliesTo` +- `urn:fhir:binding:ObservationRangeCategory` +- `urn:fhir:binding:ObservationRangeMeaning` +- `urn:fhir:binding:ObservationRangeType` +- `urn:fhir:binding:ObservationStatus` +- `urn:fhir:binding:ObservationUnit` +- `urn:fhir:binding:ObservationValueAbsentReason` +- `urn:fhir:binding:OperationKind` +- `urn:fhir:binding:OperationParameterUse` +- `urn:fhir:binding:OralDiet` +- `urn:fhir:binding:OralSites` +- `urn:fhir:binding:OrderDetail` +- `urn:fhir:binding:OrganizationAffiliation` +- `urn:fhir:binding:OrganizationSpecialty` +- `urn:fhir:binding:OrganizationType` +- `urn:fhir:binding:ParticipantRequired` +- `urn:fhir:binding:ParticipantStatus` +- `urn:fhir:binding:ParticipationStatus` +- `urn:fhir:binding:PatientRelationshipType` +- `urn:fhir:binding:PayeeType` +- `urn:fhir:binding:PayloadType` +- `urn:fhir:binding:PaymentAdjustmentReason` +- `urn:fhir:binding:PaymentNoticeStatus` +- `urn:fhir:binding:PaymentReconciliationStatus` +- `urn:fhir:binding:PaymentStatus` +- `urn:fhir:binding:PaymentType` +- `urn:fhir:binding:PlanDefinitionType` +- `urn:fhir:binding:PractitionerRole` +- `urn:fhir:binding:PractitionerSpecialty` +- `urn:fhir:binding:PrecisionEstimateType` +- `urn:fhir:binding:PreparePatient` +- `urn:fhir:binding:ProcedureCategory` +- `urn:fhir:binding:ProcedureCode` +- `urn:fhir:binding:ProcedureComplication` +- `urn:fhir:binding:ProcedureFollowUp` +- `urn:fhir:binding:ProcedureNegationReason` +- `urn:fhir:binding:ProcedureOutcome` +- `urn:fhir:binding:ProcedurePerformerRole` +- `urn:fhir:binding:ProcedureReason` +- `urn:fhir:binding:ProcedureStatus` +- `urn:fhir:binding:ProcedureType` +- `urn:fhir:binding:ProcedureUsed` +- `urn:fhir:binding:ProcessPriority` +- `urn:fhir:binding:Program` +- `urn:fhir:binding:ProgramCode` +- `urn:fhir:binding:ProgramEligibility` +- `urn:fhir:binding:PropertyRepresentation` +- `urn:fhir:binding:PropertyType` +- `urn:fhir:binding:ProvenanceActivity` +- `urn:fhir:binding:ProvenanceAgentRole` +- `urn:fhir:binding:ProvenanceAgentType` +- `urn:fhir:binding:ProvenanceEntityRole` +- `urn:fhir:binding:ProvenanceHistoryAgentType` +- `urn:fhir:binding:ProvenanceHistoryRecordActivity` +- `urn:fhir:binding:ProvenanceReason` +- `urn:fhir:binding:ProviderQualification` +- `urn:fhir:binding:PublicationStatus` +- `urn:fhir:binding:PurposeOfUse` +- `urn:fhir:binding:Qualification` +- `urn:fhir:binding:QualityOfEvidenceRating` +- `urn:fhir:binding:QuestionnaireConcept` +- `urn:fhir:binding:QuestionnaireItemOperator` +- `urn:fhir:binding:QuestionnaireItemType` +- `urn:fhir:binding:QuestionnaireResponseStatus` +- `urn:fhir:binding:ReferenceHandlingPolicy` +- `urn:fhir:binding:ReferenceVersionRules` +- `urn:fhir:binding:ReferralMethod` +- `urn:fhir:binding:ReferredDocumentStatus` +- `urn:fhir:binding:RejectionCriterion` +- `urn:fhir:binding:RelatedClaimRelationship` +- `urn:fhir:binding:Relationship` +- `urn:fhir:binding:RemittanceOutcome` +- `urn:fhir:binding:RequestIntent` +- `urn:fhir:binding:RequestPriority` +- `urn:fhir:binding:RequestStatus` +- `urn:fhir:binding:ResearchElementType` +- `urn:fhir:binding:ResearchStudyObjectiveType` +- `urn:fhir:binding:ResearchStudyPhase` +- `urn:fhir:binding:ResearchStudyPrimaryPurposeType` +- `urn:fhir:binding:ResearchStudyReasonStopped` +- `urn:fhir:binding:ResearchStudyStatus` +- `urn:fhir:binding:ResearchSubjectStatus` +- `urn:fhir:binding:ResourceType` +- `urn:fhir:binding:ResourceVersionPolicy` +- `urn:fhir:binding:ResponseType` +- `urn:fhir:binding:RestfulCapabilityMode` +- `urn:fhir:binding:RestfulSecurityService` +- `urn:fhir:binding:RevenueCenter` +- `urn:fhir:binding:RiskAssessmentProbability` +- `urn:fhir:binding:RiskAssessmentStatus` +- `urn:fhir:binding:RiskEstimateType` +- `urn:fhir:binding:SPDXLicense` +- `urn:fhir:binding:Safety` +- `urn:fhir:binding:SearchComparator` +- `urn:fhir:binding:SearchModifierCode` +- `urn:fhir:binding:SearchParamType` +- `urn:fhir:binding:SectionEmptyReason` +- `urn:fhir:binding:SectionEntryOrder` +- `urn:fhir:binding:SectionMode` +- `urn:fhir:binding:ServiceProduct` +- `urn:fhir:binding:ServiceProvisionConditions` +- `urn:fhir:binding:ServiceRequestCategory` +- `urn:fhir:binding:ServiceRequestCode` +- `urn:fhir:binding:ServiceRequestIntent` +- `urn:fhir:binding:ServiceRequestLocation` +- `urn:fhir:binding:ServiceRequestParticipantRole` +- `urn:fhir:binding:ServiceRequestPriority` +- `urn:fhir:binding:ServiceRequestReason` +- `urn:fhir:binding:ServiceRequestStatus` +- `urn:fhir:binding:Sex` +- `urn:fhir:binding:SlicingRules` +- `urn:fhir:binding:SlotStatus` +- `urn:fhir:binding:SpecimenCollection` +- `urn:fhir:binding:SpecimenCollectionMethod` +- `urn:fhir:binding:SpecimenCondition` +- `urn:fhir:binding:SpecimenContainedPreference` +- `urn:fhir:binding:SpecimenContainerType` +- `urn:fhir:binding:SpecimenProcessingProcedure` +- `urn:fhir:binding:SpecimenStatus` +- `urn:fhir:binding:SpecimenType` +- `urn:fhir:binding:Status` +- `urn:fhir:binding:StructureDefinitionKeyword` +- `urn:fhir:binding:StructureDefinitionKind` +- `urn:fhir:binding:StructureMapContextType` +- `urn:fhir:binding:StructureMapGroupTypeMode` +- `urn:fhir:binding:StructureMapInputMode` +- `urn:fhir:binding:StructureMapModelMode` +- `urn:fhir:binding:StructureMapSourceListMode` +- `urn:fhir:binding:StructureMapTargetListMode` +- `urn:fhir:binding:StructureMapTransform` +- `urn:fhir:binding:StudyType` +- `urn:fhir:binding:SubpotentReason` +- `urn:fhir:binding:SubscriptionChannelType` +- `urn:fhir:binding:SubscriptionStatus` +- `urn:fhir:binding:SubstanceCategory` +- `urn:fhir:binding:SubstanceCode` +- `urn:fhir:binding:SupplementType` +- `urn:fhir:binding:SupplyDeliveryStatus` +- `urn:fhir:binding:SupplyDeliveryType` +- `urn:fhir:binding:SupplyRequestKind` +- `urn:fhir:binding:SupplyRequestReason` +- `urn:fhir:binding:SupplyRequestStatus` +- `urn:fhir:binding:Surface` +- `urn:fhir:binding:SynthesisType` +- `urn:fhir:binding:SystemRestfulInteraction` +- `urn:fhir:binding:TargetDisease` +- `urn:fhir:binding:TaskCode` +- `urn:fhir:binding:TaskIntent` +- `urn:fhir:binding:TaskPerformerType` +- `urn:fhir:binding:TaskPriority` +- `urn:fhir:binding:TaskStatus` +- `urn:fhir:binding:TestReportActionResult` +- `urn:fhir:binding:TestReportParticipantType` +- `urn:fhir:binding:TestReportResult` +- `urn:fhir:binding:TestReportStatus` +- `urn:fhir:binding:TestScriptOperationCode` +- `urn:fhir:binding:TestScriptProfileDestinationType` +- `urn:fhir:binding:TestScriptProfileOriginType` +- `urn:fhir:binding:TestScriptRequestMethodCode` +- `urn:fhir:binding:TextureModifiedFoodType` +- `urn:fhir:binding:TextureModifier` +- `urn:fhir:binding:TypeDerivationRule` +- `urn:fhir:binding:TypeRestfulInteraction` +- `urn:fhir:binding:UCUMUnits` +- `urn:fhir:binding:UDIEntryType` +- `urn:fhir:binding:Use` +- `urn:fhir:binding:VaccineCode` +- `urn:fhir:binding:VariableType` +- `urn:fhir:binding:VisionBase` +- `urn:fhir:binding:VisionEyes` +- `urn:fhir:binding:VisionProduct` +- `urn:fhir:binding:VisionStatus` +- `urn:fhir:binding:VitalSigns` +- `urn:fhir:binding:XPathUsageType` +- `urn:fhir:binding:appointment-type` +- `urn:fhir:binding:can-push-updates` +- `urn:fhir:binding:cancelation-reason` +- `urn:fhir:binding:chromosome-human` +- `urn:fhir:binding:communication-method` +- `urn:fhir:binding:endpoint-contype` +- `urn:fhir:binding:failure-action` +- `urn:fhir:binding:messageheader-response-request` +- `urn:fhir:binding:need` +- `urn:fhir:binding:orientationType` +- `urn:fhir:binding:primary-source-type` +- `urn:fhir:binding:push-type-available` +- `urn:fhir:binding:qualityMethod` +- `urn:fhir:binding:qualityStandardSequence` +- `urn:fhir:binding:qualityType` +- `urn:fhir:binding:repositoryType` +- `urn:fhir:binding:sequenceReference` +- `urn:fhir:binding:sequenceType` +- `urn:fhir:binding:service-category` +- `urn:fhir:binding:service-specialty` +- `urn:fhir:binding:service-type` +- `urn:fhir:binding:sopClass` +- `urn:fhir:binding:specialty` +- `urn:fhir:binding:status` +- `urn:fhir:binding:strandType` +- `urn:fhir:binding:v3Act` +- `urn:fhir:binding:validation-process` +- `urn:fhir:binding:validation-status` +- `urn:fhir:binding:validation-type` + +## Schema Collisions + +The following canonicals have multiple schema versions with different content. +To inspect collision versions, export TypeSchemas using `.introspection({ typeSchemas: 'path' })` +and check `/collisions//1.json, 2.json, ...` files. + +### `shared` + +- `urn:fhir:binding:CommunicationReason` (2 versions) + - Version 1: Communication (hl7.fhir.r4.core#4.0.1) + - Version 2: CommunicationRequest (hl7.fhir.r4.core#4.0.1) +- `urn:fhir:binding:ObservationCategory` (2 versions) + - Version 1: Observation (hl7.fhir.r4.core#4.0.1), vitalsigns (hl7.fhir.r4.core#4.0.1) + - Version 2: ObservationDefinition (hl7.fhir.r4.core#4.0.1) +- `urn:fhir:binding:ObservationRangeMeaning` (2 versions) + - Version 1: cholesterol (hl7.fhir.r4.core#4.0.1), hdlcholesterol (hl7.fhir.r4.core#4.0.1), ldlcholesterol (hl7.fhir.r4.core#4.0.1), Observation (hl7.fhir.r4.core#4.0.1), triglyceride (hl7.fhir.r4.core#4.0.1) + - Version 2: ObservationDefinition (hl7.fhir.r4.core#4.0.1) +- `urn:fhir:binding:PaymentType` (2 versions) + - Version 1: ClaimResponse (hl7.fhir.r4.core#4.0.1), ExplanationOfBenefit (hl7.fhir.r4.core#4.0.1) + - Version 2: PaymentReconciliation (hl7.fhir.r4.core#4.0.1) +- `urn:fhir:binding:ProcessPriority` (2 versions) + - Version 1: Claim (hl7.fhir.r4.core#4.0.1), CoverageEligibilityRequest (hl7.fhir.r4.core#4.0.1) + - Version 2: ExplanationOfBenefit (hl7.fhir.r4.core#4.0.1) +- `urn:fhir:binding:TargetDisease` (2 versions) + - Version 1: Immunization (hl7.fhir.r4.core#4.0.1) + - Version 2: ImmunizationRecommendation (hl7.fhir.r4.core#4.0.1) diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Address.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Address.ts new file mode 100644 index 0000000..e085e45 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Address.ts @@ -0,0 +1,32 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Address (pkg: hl7.fhir.r4.core#4.0.1) +export interface Address extends Element { + city?: string; + _city?: Element; + country?: string; + _country?: Element; + district?: string; + _district?: Element; + line?: string[]; + _line?: Element; + period?: Period; + postalCode?: string; + _postalCode?: Element; + state?: string; + _state?: Element; + text?: string; + _text?: Element; + type?: ("postal" | "physical" | "both"); + _type?: Element; + use?: ("home" | "work" | "temp" | "old" | "billing"); + _use?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Age.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Age.ts new file mode 100644 index 0000000..be492a3 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Age.ts @@ -0,0 +1,11 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Age (pkg: hl7.fhir.r4.core#4.0.1) +export interface Age extends Quantity { +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Annotation.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Annotation.ts new file mode 100644 index 0000000..25bd874 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Annotation.ts @@ -0,0 +1,20 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Annotation (pkg: hl7.fhir.r4.core#4.0.1) +export interface Annotation extends Element { + authorReference?: Reference<"Organization" | "Patient" | "Practitioner" | "RelatedPerson">; + authorString?: string; + _authorString?: Element; + text: string; + _text?: Element; + time?: string; + _time?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Attachment.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Attachment.ts new file mode 100644 index 0000000..137a342 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Attachment.ts @@ -0,0 +1,27 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Attachment (pkg: hl7.fhir.r4.core#4.0.1) +export interface Attachment extends Element { + contentType?: string; + _contentType?: Element; + creation?: string; + _creation?: Element; + data?: string; + _data?: Element; + hash?: string; + _hash?: Element; + language?: ("ar" | "bn" | "cs" | "da" | "de" | "de-AT" | "de-CH" | "de-DE" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-NZ" | "en-SG" | "en-US" | "es" | "es-AR" | "es-ES" | "es-UY" | "fi" | "fr" | "fr-BE" | "fr-CH" | "fr-FR" | "fy" | "fy-NL" | "hi" | "hr" | "it" | "it-CH" | "it-IT" | "ja" | "ko" | "nl" | "nl-BE" | "nl-NL" | "no" | "no-NO" | "pa" | "pl" | "pt" | "pt-BR" | "ru" | "ru-RU" | "sr" | "sr-RS" | "sv" | "sv-SE" | "te" | "zh" | "zh-CN" | "zh-HK" | "zh-SG" | "zh-TW" | string); + _language?: Element; + size?: number; + _size?: Element; + title?: string; + _title?: Element; + url?: string; + _url?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/BackboneElement.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/BackboneElement.ts new file mode 100644 index 0000000..b2b70e6 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/BackboneElement.ts @@ -0,0 +1,14 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Extension } from "../hl7-fhir-r4-core/Extension"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Extension } from "../hl7-fhir-r4-core/Extension"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/BackboneElement (pkg: hl7.fhir.r4.core#4.0.1) +export interface BackboneElement extends Element { + modifierExtension?: Extension[]; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Bundle.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Bundle.ts new file mode 100644 index 0000000..cce9315 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Bundle.ts @@ -0,0 +1,68 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +import type { Resource } from "../hl7-fhir-r4-core/Resource"; +import type { Signature } from "../hl7-fhir-r4-core/Signature"; + +import type { Element } from "../hl7-fhir-r4-core/Element"; +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +export type { Signature } from "../hl7-fhir-r4-core/Signature"; + +export interface BundleEntry extends BackboneElement { + fullUrl?: string; + link?: BundleLink[]; + request?: BundleEntryRequest; + resource?: Resource; + response?: BundleEntryResponse; + search?: BundleEntrySearch; +} + +export interface BundleEntryRequest extends BackboneElement { + ifMatch?: string; + ifModifiedSince?: string; + ifNoneExist?: string; + ifNoneMatch?: string; + method: ("GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "PATCH"); + url: string; +} + +export interface BundleEntryResponse extends BackboneElement { + etag?: string; + lastModified?: string; + location?: string; + outcome?: Resource; + status: string; +} + +export interface BundleEntrySearch extends BackboneElement { + mode?: ("match" | "include" | "outcome"); + score?: number; +} + +export interface BundleLink extends BackboneElement { + relation: string; + url: string; +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Bundle (pkg: hl7.fhir.r4.core#4.0.1) +export interface Bundle extends Resource { + resourceType: "Bundle"; + + entry?: BundleEntry[]; + identifier?: Identifier; + link?: BundleLink[]; + signature?: Signature; + timestamp?: string; + _timestamp?: Element; + total?: number; + _total?: Element; + type: ("document" | "message" | "transaction" | "transaction-response" | "batch" | "batch-response" | "history" | "searchset" | "collection"); + _type?: Element; +} +export const isBundle = (resource: unknown): resource is Bundle => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "Bundle"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/CodeableConcept.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/CodeableConcept.ts new file mode 100644 index 0000000..94f47f6 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/CodeableConcept.ts @@ -0,0 +1,16 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/CodeableConcept (pkg: hl7.fhir.r4.core#4.0.1) +export interface CodeableConcept extends Element { + coding?: Coding[]; + text?: string; + _text?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Coding.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Coding.ts new file mode 100644 index 0000000..84ad129 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Coding.ts @@ -0,0 +1,21 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Coding (pkg: hl7.fhir.r4.core#4.0.1) +export interface Coding extends Element { + code?: T; + _code?: Element; + display?: string; + _display?: Element; + system?: string; + _system?: Element; + userSelected?: boolean; + _userSelected?: Element; + version?: string; + _version?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactDetail.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactDetail.ts new file mode 100644 index 0000000..61b94d2 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactDetail.ts @@ -0,0 +1,16 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/ContactDetail (pkg: hl7.fhir.r4.core#4.0.1) +export interface ContactDetail extends Element { + name?: string; + _name?: Element; + telecom?: ContactPoint[]; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactPoint.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactPoint.ts new file mode 100644 index 0000000..a8507dc --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ContactPoint.ts @@ -0,0 +1,22 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/ContactPoint (pkg: hl7.fhir.r4.core#4.0.1) +export interface ContactPoint extends Element { + period?: Period; + rank?: number; + _rank?: Element; + system?: ("phone" | "fax" | "email" | "pager" | "url" | "sms" | "other"); + _system?: Element; + use?: ("home" | "work" | "temp" | "old" | "mobile"); + _use?: Element; + value?: string; + _value?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Contributor.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Contributor.ts new file mode 100644 index 0000000..c0c56d2 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Contributor.ts @@ -0,0 +1,18 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { ContactDetail } from "../hl7-fhir-r4-core/ContactDetail"; +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { ContactDetail } from "../hl7-fhir-r4-core/ContactDetail"; +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Contributor (pkg: hl7.fhir.r4.core#4.0.1) +export interface Contributor extends Element { + contact?: ContactDetail[]; + name: string; + _name?: Element; + type: ("author" | "editor" | "reviewer" | "endorser"); + _type?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Count.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Count.ts new file mode 100644 index 0000000..e8db9c5 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Count.ts @@ -0,0 +1,11 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Count (pkg: hl7.fhir.r4.core#4.0.1) +export interface Count extends Quantity { +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DataRequirement.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DataRequirement.ts new file mode 100644 index 0000000..aedb177 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DataRequirement.ts @@ -0,0 +1,54 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { Duration } from "../hl7-fhir-r4-core/Duration"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Duration } from "../hl7-fhir-r4-core/Duration"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export interface DataRequirementCodeFilter extends Element { + code?: Coding[]; + path?: string; + searchParam?: string; + valueSet?: string; +} + +export interface DataRequirementDateFilter extends Element { + path?: string; + searchParam?: string; + valueDateTime?: string; + valueDuration?: Duration; + valuePeriod?: Period; +} + +export interface DataRequirementSort extends Element { + direction: ("ascending" | "descending"); + path: string; +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/DataRequirement (pkg: hl7.fhir.r4.core#4.0.1) +export interface DataRequirement extends Element { + codeFilter?: Element[]; + dateFilter?: Element[]; + limit?: number; + _limit?: Element; + mustSupport?: string[]; + _mustSupport?: Element; + profile?: string[]; + _profile?: Element; + sort?: Element[]; + subjectCodeableConcept?: CodeableConcept; + subjectReference?: Reference<"Group">; + type: string; + _type?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Distance.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Distance.ts new file mode 100644 index 0000000..0dcb5be --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Distance.ts @@ -0,0 +1,11 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Distance (pkg: hl7.fhir.r4.core#4.0.1) +export interface Distance extends Quantity { +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DomainResource.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DomainResource.ts new file mode 100644 index 0000000..a316e18 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/DomainResource.ts @@ -0,0 +1,23 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Extension } from "../hl7-fhir-r4-core/Extension"; +import type { Narrative } from "../hl7-fhir-r4-core/Narrative"; +import type { Resource } from "../hl7-fhir-r4-core/Resource"; + +export type { Extension } from "../hl7-fhir-r4-core/Extension"; +export type { Narrative } from "../hl7-fhir-r4-core/Narrative"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/DomainResource (pkg: hl7.fhir.r4.core#4.0.1) +export interface DomainResource extends Resource { + resourceType: "DomainResource" | "Encounter" | "Location" | "OperationOutcome" | "Patient"; + + contained?: Resource[]; + extension?: Extension[]; + modifierExtension?: Extension[]; + text?: Narrative; +} +export const isDomainResource = (resource: unknown): resource is DomainResource => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "DomainResource"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Dosage.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Dosage.ts new file mode 100644 index 0000000..3f78d88 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Dosage.ts @@ -0,0 +1,50 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +import type { Range } from "../hl7-fhir-r4-core/Range"; +import type { Ratio } from "../hl7-fhir-r4-core/Ratio"; +import type { Timing } from "../hl7-fhir-r4-core/Timing"; + +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +export type { Range } from "../hl7-fhir-r4-core/Range"; +export type { Ratio } from "../hl7-fhir-r4-core/Ratio"; +export type { Timing } from "../hl7-fhir-r4-core/Timing"; + +export interface DosageDoseAndRate extends Element { + doseQuantity?: Quantity; + doseRange?: Range; + rateQuantity?: Quantity; + rateRange?: Range; + rateRatio?: Ratio; + type?: CodeableConcept; +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Dosage (pkg: hl7.fhir.r4.core#4.0.1) +export interface Dosage extends BackboneElement { + additionalInstruction?: CodeableConcept[]; + asNeededBoolean?: boolean; + _asNeededBoolean?: Element; + asNeededCodeableConcept?: CodeableConcept; + doseAndRate?: Element[]; + maxDosePerAdministration?: Quantity; + maxDosePerLifetime?: Quantity; + maxDosePerPeriod?: Ratio; + method?: CodeableConcept; + patientInstruction?: string; + _patientInstruction?: Element; + route?: CodeableConcept; + sequence?: number; + _sequence?: Element; + site?: CodeableConcept; + text?: string; + _text?: Element; + timing?: Timing; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Duration.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Duration.ts new file mode 100644 index 0000000..0019823 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Duration.ts @@ -0,0 +1,11 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Duration (pkg: hl7.fhir.r4.core#4.0.1) +export interface Duration extends Quantity { +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Element.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Element.ts new file mode 100644 index 0000000..eac8191 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Element.ts @@ -0,0 +1,14 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Extension } from "../hl7-fhir-r4-core/Extension"; + +export type { Extension } from "../hl7-fhir-r4-core/Extension"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Element (pkg: hl7.fhir.r4.core#4.0.1) +export interface Element { + extension?: Extension[]; + id?: string; + _id?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Encounter.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Encounter.ts new file mode 100644 index 0000000..8c657da --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Encounter.ts @@ -0,0 +1,95 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { DomainResource } from "../hl7-fhir-r4-core/DomainResource"; +import type { Duration } from "../hl7-fhir-r4-core/Duration"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +import type { Element } from "../hl7-fhir-r4-core/Element"; +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Duration } from "../hl7-fhir-r4-core/Duration"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export interface EncounterClassHistory extends BackboneElement { + "class": Coding; + period: Period; +} + +export interface EncounterDiagnosis extends BackboneElement { + condition: Reference<"Condition" | "Procedure">; + rank?: number; + use?: CodeableConcept<("AD" | "DD" | "CC" | "CM" | "pre-op" | "post-op" | "billing" | string)>; +} + +export interface EncounterHospitalization extends BackboneElement { + admitSource?: CodeableConcept<("hosp-trans" | "emd" | "outp" | "born" | "gp" | "mp" | "nursing" | "psych" | "rehab" | "other" | string)>; + destination?: Reference<"Location" | "Organization">; + dietPreference?: CodeableConcept[]; + dischargeDisposition?: CodeableConcept; + origin?: Reference<"Location" | "Organization">; + preAdmissionIdentifier?: Identifier; + reAdmission?: CodeableConcept; + specialArrangement?: CodeableConcept<("wheel" | "add-bed" | "int" | "att" | "dog" | string)>[]; + specialCourtesy?: CodeableConcept<("EXT" | "NRM" | "PRF" | "STF" | "VIP" | "UNK" | string)>[]; +} + +export interface EncounterLocation extends BackboneElement { + location: Reference<"Location">; + period?: Period; + physicalType?: CodeableConcept; + status?: ("planned" | "active" | "reserved" | "completed"); +} + +export interface EncounterParticipant extends BackboneElement { + individual?: Reference<"Practitioner" | "PractitionerRole" | "RelatedPerson">; + period?: Period; + type?: CodeableConcept<("SPRF" | "PPRF" | "PART" | "translator" | "emergency" | string)>[]; +} + +export interface EncounterStatusHistory extends BackboneElement { + period: Period; + status: ("planned" | "arrived" | "triaged" | "in-progress" | "onleave" | "finished" | "cancelled" | "entered-in-error" | "unknown"); +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Encounter (pkg: hl7.fhir.r4.core#4.0.1) +export interface Encounter extends DomainResource { + resourceType: "Encounter"; + + account?: Reference<"Account">[]; + appointment?: Reference<"Appointment">[]; + basedOn?: Reference<"ServiceRequest">[]; + "class": Coding; + classHistory?: EncounterClassHistory[]; + diagnosis?: EncounterDiagnosis[]; + episodeOfCare?: Reference<"EpisodeOfCare">[]; + hospitalization?: EncounterHospitalization; + identifier?: Identifier[]; + length?: Duration; + location?: EncounterLocation[]; + participant?: EncounterParticipant[]; + partOf?: Reference<"Encounter">; + period?: Period; + priority?: CodeableConcept; + reasonCode?: CodeableConcept[]; + reasonReference?: Reference<"Condition" | "ImmunizationRecommendation" | "Observation" | "Procedure">[]; + serviceProvider?: Reference<"Organization">; + serviceType?: CodeableConcept; + status: ("planned" | "arrived" | "triaged" | "in-progress" | "onleave" | "finished" | "cancelled" | "entered-in-error" | "unknown"); + _status?: Element; + statusHistory?: EncounterStatusHistory[]; + subject?: Reference<"Group" | "Patient">; + type?: CodeableConcept[]; +} +export const isEncounter = (resource: unknown): resource is Encounter => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "Encounter"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Expression.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Expression.ts new file mode 100644 index 0000000..9033b39 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Expression.ts @@ -0,0 +1,21 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Expression (pkg: hl7.fhir.r4.core#4.0.1) +export interface Expression extends Element { + description?: string; + _description?: Element; + expression?: string; + _expression?: Element; + language: ("text/cql" | "text/fhirpath" | "application/x-fhir-query" | string); + _language?: Element; + name?: string; + _name?: Element; + reference?: string; + _reference?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Extension.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Extension.ts new file mode 100644 index 0000000..34dcb31 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Extension.ts @@ -0,0 +1,144 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Address } from "../hl7-fhir-r4-core/Address"; +import type { Age } from "../hl7-fhir-r4-core/Age"; +import type { Annotation } from "../hl7-fhir-r4-core/Annotation"; +import type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { ContactDetail } from "../hl7-fhir-r4-core/ContactDetail"; +import type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +import type { Contributor } from "../hl7-fhir-r4-core/Contributor"; +import type { Count } from "../hl7-fhir-r4-core/Count"; +import type { DataRequirement } from "../hl7-fhir-r4-core/DataRequirement"; +import type { Distance } from "../hl7-fhir-r4-core/Distance"; +import type { Dosage } from "../hl7-fhir-r4-core/Dosage"; +import type { Duration } from "../hl7-fhir-r4-core/Duration"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Expression } from "../hl7-fhir-r4-core/Expression"; +import type { HumanName } from "../hl7-fhir-r4-core/HumanName"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +import type { Meta } from "../hl7-fhir-r4-core/Meta"; +import type { Money } from "../hl7-fhir-r4-core/Money"; +import type { ParameterDefinition } from "../hl7-fhir-r4-core/ParameterDefinition"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +import type { Range } from "../hl7-fhir-r4-core/Range"; +import type { Ratio } from "../hl7-fhir-r4-core/Ratio"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; +import type { RelatedArtifact } from "../hl7-fhir-r4-core/RelatedArtifact"; +import type { SampledData } from "../hl7-fhir-r4-core/SampledData"; +import type { Signature } from "../hl7-fhir-r4-core/Signature"; +import type { Timing } from "../hl7-fhir-r4-core/Timing"; +import type { TriggerDefinition } from "../hl7-fhir-r4-core/TriggerDefinition"; +import type { UsageContext } from "../hl7-fhir-r4-core/UsageContext"; + +export type { Address } from "../hl7-fhir-r4-core/Address"; +export type { Age } from "../hl7-fhir-r4-core/Age"; +export type { Annotation } from "../hl7-fhir-r4-core/Annotation"; +export type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { ContactDetail } from "../hl7-fhir-r4-core/ContactDetail"; +export type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +export type { Contributor } from "../hl7-fhir-r4-core/Contributor"; +export type { Count } from "../hl7-fhir-r4-core/Count"; +export type { DataRequirement } from "../hl7-fhir-r4-core/DataRequirement"; +export type { Distance } from "../hl7-fhir-r4-core/Distance"; +export type { Dosage } from "../hl7-fhir-r4-core/Dosage"; +export type { Duration } from "../hl7-fhir-r4-core/Duration"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Expression } from "../hl7-fhir-r4-core/Expression"; +export type { HumanName } from "../hl7-fhir-r4-core/HumanName"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +export type { Meta } from "../hl7-fhir-r4-core/Meta"; +export type { Money } from "../hl7-fhir-r4-core/Money"; +export type { ParameterDefinition } from "../hl7-fhir-r4-core/ParameterDefinition"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +export type { Range } from "../hl7-fhir-r4-core/Range"; +export type { Ratio } from "../hl7-fhir-r4-core/Ratio"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; +export type { RelatedArtifact } from "../hl7-fhir-r4-core/RelatedArtifact"; +export type { SampledData } from "../hl7-fhir-r4-core/SampledData"; +export type { Signature } from "../hl7-fhir-r4-core/Signature"; +export type { Timing } from "../hl7-fhir-r4-core/Timing"; +export type { TriggerDefinition } from "../hl7-fhir-r4-core/TriggerDefinition"; +export type { UsageContext } from "../hl7-fhir-r4-core/UsageContext"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Extension (pkg: hl7.fhir.r4.core#4.0.1) +export interface Extension extends Element { + url: string; + _url?: Element; + valueAddress?: Address; + valueAge?: Age; + valueAnnotation?: Annotation; + valueAttachment?: Attachment; + valueBase64Binary?: string; + _valueBase64Binary?: Element; + valueBoolean?: boolean; + _valueBoolean?: Element; + valueCanonical?: string; + _valueCanonical?: Element; + valueCode?: string; + _valueCode?: Element; + valueCodeableConcept?: CodeableConcept; + valueCoding?: Coding; + valueContactDetail?: ContactDetail; + valueContactPoint?: ContactPoint; + valueContributor?: Contributor; + valueCount?: Count; + valueDataRequirement?: DataRequirement; + valueDate?: string; + _valueDate?: Element; + valueDateTime?: string; + _valueDateTime?: Element; + valueDecimal?: number; + _valueDecimal?: Element; + valueDistance?: Distance; + valueDosage?: Dosage; + valueDuration?: Duration; + valueExpression?: Expression; + valueHumanName?: HumanName; + valueId?: string; + _valueId?: Element; + valueIdentifier?: Identifier; + valueInstant?: string; + _valueInstant?: Element; + valueInteger?: number; + _valueInteger?: Element; + valueMarkdown?: string; + _valueMarkdown?: Element; + valueMeta?: Meta; + valueMoney?: Money; + valueOid?: string; + _valueOid?: Element; + valueParameterDefinition?: ParameterDefinition; + valuePeriod?: Period; + valuePositiveInt?: number; + _valuePositiveInt?: Element; + valueQuantity?: Quantity; + valueRange?: Range; + valueRatio?: Ratio; + valueReference?: Reference; + valueRelatedArtifact?: RelatedArtifact; + valueSampledData?: SampledData; + valueSignature?: Signature; + valueString?: string; + _valueString?: Element; + valueTime?: string; + _valueTime?: Element; + valueTiming?: Timing; + valueTriggerDefinition?: TriggerDefinition; + valueUnsignedInt?: number; + _valueUnsignedInt?: Element; + valueUri?: string; + _valueUri?: Element; + valueUrl?: string; + _valueUrl?: Element; + valueUsageContext?: UsageContext; + valueUuid?: string; + _valueUuid?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/HumanName.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/HumanName.ts new file mode 100644 index 0000000..c2c2a78 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/HumanName.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/HumanName (pkg: hl7.fhir.r4.core#4.0.1) +export interface HumanName extends Element { + family?: string; + _family?: Element; + given?: string[]; + _given?: Element; + period?: Period; + prefix?: string[]; + _prefix?: Element; + suffix?: string[]; + _suffix?: Element; + text?: string; + _text?: Element; + use?: ("usual" | "official" | "temp" | "nickname" | "anonymous" | "old" | "maiden"); + _use?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Identifier.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Identifier.ts new file mode 100644 index 0000000..2171bdb --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Identifier.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Identifier (pkg: hl7.fhir.r4.core#4.0.1) +export interface Identifier extends Element { + assigner?: Reference<"Organization">; + period?: Period; + system?: string; + _system?: Element; + type?: CodeableConcept<("DL" | "PPN" | "BRN" | "MR" | "MCN" | "EN" | "TAX" | "NIIP" | "PRN" | "MD" | "DR" | "ACSN" | "UDI" | "SNO" | "SB" | "PLAC" | "FILL" | "JHN" | string)>; + use?: ("usual" | "official" | "temp" | "secondary" | "old"); + _use?: Element; + value?: string; + _value?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Location.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Location.ts new file mode 100644 index 0000000..e6b60c6 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Location.ts @@ -0,0 +1,66 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Address } from "../hl7-fhir-r4-core/Address"; +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +import type { DomainResource } from "../hl7-fhir-r4-core/DomainResource"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +import type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Address } from "../hl7-fhir-r4-core/Address"; +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export interface LocationHoursOfOperation extends BackboneElement { + allDay?: boolean; + closingTime?: string; + daysOfWeek?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; + openingTime?: string; +} + +export interface LocationPosition extends BackboneElement { + altitude?: number; + latitude: number; + longitude: number; +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Location (pkg: hl7.fhir.r4.core#4.0.1) +export interface Location extends DomainResource { + resourceType: "Location"; + + address?: Address; + alias?: string[]; + _alias?: Element; + availabilityExceptions?: string; + _availabilityExceptions?: Element; + description?: string; + _description?: Element; + endpoint?: Reference<"Endpoint">[]; + hoursOfOperation?: LocationHoursOfOperation[]; + identifier?: Identifier[]; + managingOrganization?: Reference<"Organization">; + mode?: ("instance" | "kind"); + _mode?: Element; + name?: string; + _name?: Element; + operationalStatus?: Coding<("C" | "H" | "I" | "K" | "O" | "U" | string)>; + partOf?: Reference<"Location">; + physicalType?: CodeableConcept; + position?: LocationPosition; + status?: ("active" | "suspended" | "inactive"); + _status?: Element; + telecom?: ContactPoint[]; + type?: CodeableConcept[]; +} +export const isLocation = (resource: unknown): resource is Location => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "Location"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Meta.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Meta.ts new file mode 100644 index 0000000..d3ebfe1 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Meta.ts @@ -0,0 +1,23 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Meta (pkg: hl7.fhir.r4.core#4.0.1) +export interface Meta extends Element { + lastUpdated?: string; + _lastUpdated?: Element; + profile?: string[]; + _profile?: Element; + security?: Coding[]; + source?: string; + _source?: Element; + tag?: Coding[]; + versionId?: string; + _versionId?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Money.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Money.ts new file mode 100644 index 0000000..4a63765 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Money.ts @@ -0,0 +1,15 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Money (pkg: hl7.fhir.r4.core#4.0.1) +export interface Money extends Element { + currency?: string; + _currency?: Element; + value?: number; + _value?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Narrative.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Narrative.ts new file mode 100644 index 0000000..572f021 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Narrative.ts @@ -0,0 +1,15 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Narrative (pkg: hl7.fhir.r4.core#4.0.1) +export interface Narrative extends Element { + div: string; + _div?: Element; + status: ("generated" | "extensions" | "additional" | "empty"); + _status?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/OperationOutcome.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/OperationOutcome.ts new file mode 100644 index 0000000..4d1f622 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/OperationOutcome.ts @@ -0,0 +1,29 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { DomainResource } from "../hl7-fhir-r4-core/DomainResource"; + +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; + +export interface OperationOutcomeIssue extends BackboneElement { + code: ("invalid" | "structure" | "required" | "value" | "invariant" | "security" | "login" | "unknown" | "expired" | "forbidden" | "suppressed" | "processing" | "not-supported" | "duplicate" | "multiple-matches" | "not-found" | "deleted" | "too-long" | "code-invalid" | "extension" | "too-costly" | "business-rule" | "conflict" | "transient" | "lock-error" | "no-store" | "exception" | "timeout" | "incomplete" | "throttled" | "informational"); + details?: CodeableConcept; + diagnostics?: string; + expression?: string[]; + location?: string[]; + severity: ("fatal" | "error" | "warning" | "information"); +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/OperationOutcome (pkg: hl7.fhir.r4.core#4.0.1) +export interface OperationOutcome extends DomainResource { + resourceType: "OperationOutcome"; + + issue: OperationOutcomeIssue[]; +} +export const isOperationOutcome = (resource: unknown): resource is OperationOutcome => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "OperationOutcome"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ParameterDefinition.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ParameterDefinition.ts new file mode 100644 index 0000000..7b2b263 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/ParameterDefinition.ts @@ -0,0 +1,25 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/ParameterDefinition (pkg: hl7.fhir.r4.core#4.0.1) +export interface ParameterDefinition extends Element { + documentation?: string; + _documentation?: Element; + max?: string; + _max?: Element; + min?: number; + _min?: Element; + name?: string; + _name?: Element; + profile?: string; + _profile?: Element; + type: string; + _type?: Element; + use: ("in" | "out"); + _use?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Patient.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Patient.ts new file mode 100644 index 0000000..05802a8 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Patient.ts @@ -0,0 +1,79 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Address } from "../hl7-fhir-r4-core/Address"; +import type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +import type { DomainResource } from "../hl7-fhir-r4-core/DomainResource"; +import type { HumanName } from "../hl7-fhir-r4-core/HumanName"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +import type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Address } from "../hl7-fhir-r4-core/Address"; +export type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { ContactPoint } from "../hl7-fhir-r4-core/ContactPoint"; +export type { HumanName } from "../hl7-fhir-r4-core/HumanName"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export interface PatientCommunication extends BackboneElement { + language: CodeableConcept<("ar" | "bn" | "cs" | "da" | "de" | "de-AT" | "de-CH" | "de-DE" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-NZ" | "en-SG" | "en-US" | "es" | "es-AR" | "es-ES" | "es-UY" | "fi" | "fr" | "fr-BE" | "fr-CH" | "fr-FR" | "fy" | "fy-NL" | "hi" | "hr" | "it" | "it-CH" | "it-IT" | "ja" | "ko" | "nl" | "nl-BE" | "nl-NL" | "no" | "no-NO" | "pa" | "pl" | "pt" | "pt-BR" | "ru" | "ru-RU" | "sr" | "sr-RS" | "sv" | "sv-SE" | "te" | "zh" | "zh-CN" | "zh-HK" | "zh-SG" | "zh-TW" | string)>; + preferred?: boolean; +} + +export interface PatientContact extends BackboneElement { + address?: Address; + gender?: ("male" | "female" | "other" | "unknown"); + name?: HumanName; + organization?: Reference<"Organization">; + period?: Period; + relationship?: CodeableConcept[]; + telecom?: ContactPoint[]; +} + +export interface PatientLink extends BackboneElement { + other: Reference<"Patient" | "RelatedPerson">; + type: ("replaced-by" | "replaces" | "refer" | "seealso"); +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Patient (pkg: hl7.fhir.r4.core#4.0.1) +export interface Patient extends DomainResource { + resourceType: "Patient"; + + active?: boolean; + _active?: Element; + address?: Address[]; + birthDate?: string; + _birthDate?: Element; + communication?: PatientCommunication[]; + contact?: PatientContact[]; + deceasedBoolean?: boolean; + _deceasedBoolean?: Element; + deceasedDateTime?: string; + _deceasedDateTime?: Element; + gender?: ("male" | "female" | "other" | "unknown"); + _gender?: Element; + generalPractitioner?: Reference<"Organization" | "Practitioner" | "PractitionerRole">[]; + identifier?: Identifier[]; + link?: PatientLink[]; + managingOrganization?: Reference<"Organization">; + maritalStatus?: CodeableConcept<("A" | "D" | "I" | "L" | "M" | "P" | "S" | "T" | "U" | "W" | "UNK" | string)>; + multipleBirthBoolean?: boolean; + _multipleBirthBoolean?: Element; + multipleBirthInteger?: number; + _multipleBirthInteger?: Element; + name?: HumanName[]; + photo?: Attachment[]; + telecom?: ContactPoint[]; +} +export const isPatient = (resource: unknown): resource is Patient => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "Patient"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Period.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Period.ts new file mode 100644 index 0000000..5a87c3f --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Period.ts @@ -0,0 +1,15 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Period (pkg: hl7.fhir.r4.core#4.0.1) +export interface Period extends Element { + end?: string; + _end?: Element; + start?: string; + _start?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Quantity.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Quantity.ts new file mode 100644 index 0000000..d7724c4 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Quantity.ts @@ -0,0 +1,21 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Quantity (pkg: hl7.fhir.r4.core#4.0.1) +export interface Quantity extends Element { + code?: string; + _code?: Element; + comparator?: ("<" | "<=" | ">=" | ">"); + _comparator?: Element; + system?: string; + _system?: Element; + unit?: string; + _unit?: Element; + value?: number; + _value?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Range.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Range.ts new file mode 100644 index 0000000..770d611 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Range.ts @@ -0,0 +1,15 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Range (pkg: hl7.fhir.r4.core#4.0.1) +export interface Range extends Element { + high?: Quantity; + low?: Quantity; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Ratio.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Ratio.ts new file mode 100644 index 0000000..a7b6611 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Ratio.ts @@ -0,0 +1,15 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Ratio (pkg: hl7.fhir.r4.core#4.0.1) +export interface Ratio extends Element { + denominator?: Quantity; + numerator?: Quantity; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Reference.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Reference.ts new file mode 100644 index 0000000..f59d6fe --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Reference.ts @@ -0,0 +1,20 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Identifier } from "../hl7-fhir-r4-core/Identifier"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Identifier } from "../hl7-fhir-r4-core/Identifier"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Reference (pkg: hl7.fhir.r4.core#4.0.1) +export interface Reference extends Element { + display?: string; + _display?: Element; + identifier?: Identifier; + reference?: `${T}/${string}`; + _reference?: Element; + type?: string; + _type?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/RelatedArtifact.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/RelatedArtifact.ts new file mode 100644 index 0000000..d3fa215 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/RelatedArtifact.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +import type { Element } from "../hl7-fhir-r4-core/Element"; + +export type { Attachment } from "../hl7-fhir-r4-core/Attachment"; +export type { Element } from "../hl7-fhir-r4-core/Element"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/RelatedArtifact (pkg: hl7.fhir.r4.core#4.0.1) +export interface RelatedArtifact extends Element { + citation?: string; + _citation?: Element; + display?: string; + _display?: Element; + document?: Attachment; + label?: string; + _label?: Element; + resource?: string; + _resource?: Element; + type: ("documentation" | "justification" | "citation" | "predecessor" | "successor" | "derived-from" | "depends-on" | "composed-of"); + _type?: Element; + url?: string; + _url?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Resource.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Resource.ts new file mode 100644 index 0000000..88f8304 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Resource.ts @@ -0,0 +1,24 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Meta } from "../hl7-fhir-r4-core/Meta"; + +import type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Meta } from "../hl7-fhir-r4-core/Meta"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Resource (pkg: hl7.fhir.r4.core#4.0.1) +export interface Resource { + resourceType: "Bundle" | "DomainResource" | "Encounter" | "Location" | "OperationOutcome" | "Patient" | "Resource"; + + id?: string; + _id?: Element; + implicitRules?: string; + _implicitRules?: Element; + language?: ("ar" | "bn" | "cs" | "da" | "de" | "de-AT" | "de-CH" | "de-DE" | "el" | "en" | "en-AU" | "en-CA" | "en-GB" | "en-IN" | "en-NZ" | "en-SG" | "en-US" | "es" | "es-AR" | "es-ES" | "es-UY" | "fi" | "fr" | "fr-BE" | "fr-CH" | "fr-FR" | "fy" | "fy-NL" | "hi" | "hr" | "it" | "it-CH" | "it-IT" | "ja" | "ko" | "nl" | "nl-BE" | "nl-NL" | "no" | "no-NO" | "pa" | "pl" | "pt" | "pt-BR" | "ru" | "ru-RU" | "sr" | "sr-RS" | "sv" | "sv-SE" | "te" | "zh" | "zh-CN" | "zh-HK" | "zh-SG" | "zh-TW" | string); + _language?: Element; + meta?: Meta; +} +export const isResource = (resource: unknown): resource is Resource => { + return resource !== null && typeof resource === "object" && (resource as {resourceType: string}).resourceType === "Resource"; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/SampledData.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/SampledData.ts new file mode 100644 index 0000000..fdde08b --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/SampledData.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/SampledData (pkg: hl7.fhir.r4.core#4.0.1) +export interface SampledData extends Element { + data?: string; + _data?: Element; + dimensions: number; + _dimensions?: Element; + factor?: number; + _factor?: Element; + lowerLimit?: number; + _lowerLimit?: Element; + origin: Quantity; + period: number; + _period?: Element; + upperLimit?: number; + _upperLimit?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Signature.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Signature.ts new file mode 100644 index 0000000..5a46421 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Signature.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Signature (pkg: hl7.fhir.r4.core#4.0.1) +export interface Signature extends Element { + data?: string; + _data?: Element; + onBehalfOf?: Reference<"Device" | "Organization" | "Patient" | "Practitioner" | "PractitionerRole" | "RelatedPerson">; + sigFormat?: string; + _sigFormat?: Element; + targetFormat?: string; + _targetFormat?: Element; + type: Coding<("1.2.840.10065.1.12.1.1" | "1.2.840.10065.1.12.1.2" | "1.2.840.10065.1.12.1.3" | "1.2.840.10065.1.12.1.4" | "1.2.840.10065.1.12.1.5" | "1.2.840.10065.1.12.1.6" | "1.2.840.10065.1.12.1.7" | "1.2.840.10065.1.12.1.8" | "1.2.840.10065.1.12.1.9" | "1.2.840.10065.1.12.1.10" | "1.2.840.10065.1.12.1.11" | "1.2.840.10065.1.12.1.12" | "1.2.840.10065.1.12.1.13" | "1.2.840.10065.1.12.1.14" | "1.2.840.10065.1.12.1.15" | "1.2.840.10065.1.12.1.16" | "1.2.840.10065.1.12.1.17" | "1.2.840.10065.1.12.1.18" | string)>[]; + when: string; + _when?: Element; + who: Reference<"Device" | "Organization" | "Patient" | "Practitioner" | "PractitionerRole" | "RelatedPerson">; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Timing.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Timing.ts new file mode 100644 index 0000000..e9d1a3b --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/Timing.ts @@ -0,0 +1,45 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Duration } from "../hl7-fhir-r4-core/Duration"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Period } from "../hl7-fhir-r4-core/Period"; +import type { Range } from "../hl7-fhir-r4-core/Range"; + +export type { BackboneElement } from "../hl7-fhir-r4-core/BackboneElement"; +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Duration } from "../hl7-fhir-r4-core/Duration"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Period } from "../hl7-fhir-r4-core/Period"; +export type { Range } from "../hl7-fhir-r4-core/Range"; + +export interface TimingRepeat extends Element { + boundsDuration?: Duration; + boundsPeriod?: Period; + boundsRange?: Range; + count?: number; + countMax?: number; + dayOfWeek?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; + duration?: number; + durationMax?: number; + durationUnit?: ("s" | "min" | "h" | "d" | "wk" | "mo" | "a"); + frequency?: number; + frequencyMax?: number; + offset?: number; + period?: number; + periodMax?: number; + periodUnit?: ("s" | "min" | "h" | "d" | "wk" | "mo" | "a"); + timeOfDay?: string[]; + when?: ("MORN" | "MORN.early" | "MORN.late" | "NOON" | "AFT" | "AFT.early" | "AFT.late" | "EVE" | "EVE.early" | "EVE.late" | "NIGHT" | "PHS" | "HS" | "WAKE" | "C" | "CM" | "CD" | "CV" | "AC" | "ACM" | "ACD" | "ACV" | "PC" | "PCM" | "PCD" | "PCV")[]; +} + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/Timing (pkg: hl7.fhir.r4.core#4.0.1) +export interface Timing extends BackboneElement { + code?: CodeableConcept<("BID" | "TID" | "QID" | "AM" | "PM" | "QD" | "QOD" | "Q1H" | "Q2H" | "Q3H" | "Q4H" | "Q6H" | "Q8H" | "BED" | "WK" | "MO" | string)>; + event?: string[]; + _event?: Element; + repeat?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/TriggerDefinition.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/TriggerDefinition.ts new file mode 100644 index 0000000..293b3b4 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/TriggerDefinition.ts @@ -0,0 +1,31 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { DataRequirement } from "../hl7-fhir-r4-core/DataRequirement"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Expression } from "../hl7-fhir-r4-core/Expression"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; +import type { Timing } from "../hl7-fhir-r4-core/Timing"; + +export type { DataRequirement } from "../hl7-fhir-r4-core/DataRequirement"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Expression } from "../hl7-fhir-r4-core/Expression"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; +export type { Timing } from "../hl7-fhir-r4-core/Timing"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/TriggerDefinition (pkg: hl7.fhir.r4.core#4.0.1) +export interface TriggerDefinition extends Element { + condition?: Expression; + data?: DataRequirement[]; + name?: string; + _name?: Element; + timingDate?: string; + _timingDate?: Element; + timingDateTime?: string; + _timingDateTime?: Element; + timingReference?: Reference<"Schedule">; + timingTiming?: Timing; + type: ("named-event" | "periodic" | "data-changed" | "data-added" | "data-modified" | "data-removed" | "data-accessed" | "data-access-ended"); + _type?: Element; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/UsageContext.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/UsageContext.ts new file mode 100644 index 0000000..1969171 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/UsageContext.ts @@ -0,0 +1,26 @@ +// WARNING: This file is autogenerated by @atomic-ehr/codegen. +// GitHub: https://github.com/atomic-ehr/codegen +// Any manual changes made to this file may be overwritten. + +import type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +import type { Coding } from "../hl7-fhir-r4-core/Coding"; +import type { Element } from "../hl7-fhir-r4-core/Element"; +import type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +import type { Range } from "../hl7-fhir-r4-core/Range"; +import type { Reference } from "../hl7-fhir-r4-core/Reference"; + +export type { CodeableConcept } from "../hl7-fhir-r4-core/CodeableConcept"; +export type { Coding } from "../hl7-fhir-r4-core/Coding"; +export type { Element } from "../hl7-fhir-r4-core/Element"; +export type { Quantity } from "../hl7-fhir-r4-core/Quantity"; +export type { Range } from "../hl7-fhir-r4-core/Range"; +export type { Reference } from "../hl7-fhir-r4-core/Reference"; + +// CanonicalURL: http://hl7.org/fhir/StructureDefinition/UsageContext (pkg: hl7.fhir.r4.core#4.0.1) +export interface UsageContext extends Element { + code: Coding<("gender" | "age" | "focus" | "user" | "workflow" | "task" | "venue" | "species" | "program" | string)>; + valueCodeableConcept?: CodeableConcept; + valueQuantity?: Quantity; + valueRange?: Range; + valueReference?: Reference<"Group" | "HealthcareService" | "InsurancePlan" | "Location" | "Organization" | "PlanDefinition" | "ResearchStudy">; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/index.ts b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/index.ts new file mode 100644 index 0000000..8c81e60 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/fhir-types/hl7-fhir-r4-core/index.ts @@ -0,0 +1,49 @@ +export type { Address } from "./Address"; +export type { Age } from "./Age"; +export type { Annotation } from "./Annotation"; +export type { Attachment } from "./Attachment"; +export type { BackboneElement } from "./BackboneElement"; +export type { Bundle, BundleEntry, BundleEntryRequest, BundleEntryResponse, BundleEntrySearch, BundleLink } from "./Bundle"; +export { isBundle } from "./Bundle"; +export type { CodeableConcept } from "./CodeableConcept"; +export type { Coding } from "./Coding"; +export type { ContactDetail } from "./ContactDetail"; +export type { ContactPoint } from "./ContactPoint"; +export type { Contributor } from "./Contributor"; +export type { Count } from "./Count"; +export type { DataRequirement } from "./DataRequirement"; +export type { Distance } from "./Distance"; +export type { DomainResource } from "./DomainResource"; +export { isDomainResource } from "./DomainResource"; +export type { Dosage } from "./Dosage"; +export type { Duration } from "./Duration"; +export type { Element } from "./Element"; +export type { Encounter, EncounterClassHistory, EncounterDiagnosis, EncounterHospitalization, EncounterLocation, EncounterParticipant, EncounterStatusHistory } from "./Encounter"; +export { isEncounter } from "./Encounter"; +export type { Expression } from "./Expression"; +export type { Extension } from "./Extension"; +export type { HumanName } from "./HumanName"; +export type { Identifier } from "./Identifier"; +export type { Location, LocationHoursOfOperation, LocationPosition } from "./Location"; +export { isLocation } from "./Location"; +export type { Meta } from "./Meta"; +export type { Money } from "./Money"; +export type { Narrative } from "./Narrative"; +export type { OperationOutcome, OperationOutcomeIssue } from "./OperationOutcome"; +export { isOperationOutcome } from "./OperationOutcome"; +export type { ParameterDefinition } from "./ParameterDefinition"; +export type { Patient, PatientCommunication, PatientContact, PatientLink } from "./Patient"; +export { isPatient } from "./Patient"; +export type { Period } from "./Period"; +export type { Quantity } from "./Quantity"; +export type { Range } from "./Range"; +export type { Ratio } from "./Ratio"; +export type { Reference } from "./Reference"; +export type { RelatedArtifact } from "./RelatedArtifact"; +export type { Resource } from "./Resource"; +export { isResource } from "./Resource"; +export type { SampledData } from "./SampledData"; +export type { Signature } from "./Signature"; +export type { Timing } from "./Timing"; +export type { TriggerDefinition } from "./TriggerDefinition"; +export type { UsageContext } from "./UsageContext"; diff --git a/aidbox-features/aidbox-canonical-mapping/src/shared/fhir-mapper.ts b/aidbox-features/aidbox-canonical-mapping/src/shared/fhir-mapper.ts new file mode 100644 index 0000000..14a63a2 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/shared/fhir-mapper.ts @@ -0,0 +1,456 @@ +/** + * FHIR Mapper + * Maps HIS (Hospital Information System) API responses to FHIR R4 resources + */ + +import type { Bundle, BundleEntry } from "../fhir-types/hl7-fhir-r4-core/Bundle"; +import type { Patient } from "../fhir-types/hl7-fhir-r4-core/Patient"; +import type { Encounter, EncounterLocation } from "../fhir-types/hl7-fhir-r4-core/Encounter"; +import type { Location } from "../fhir-types/hl7-fhir-r4-core/Location"; +import type { Identifier } from "../fhir-types/hl7-fhir-r4-core/Identifier"; +import type { HumanName } from "../fhir-types/hl7-fhir-r4-core/HumanName"; +import type { Coding } from "../fhir-types/hl7-fhir-r4-core/Coding"; +import type { CurrentInpatient, Patient as HISPatient, WardPatientData } from "./types/his"; +import type { ADTPatientData, ADTEncounterData } from "./types/events"; + +// Re-export types for use in other modules +export type { Bundle, Patient, Encounter, Location }; + +// ============ Identifier Systems ============ + +const HIS_PATIENT_SYSTEM = "https://his.example.com/patient-id"; +const HIS_SPELL_SYSTEM = "https://his.example.com/spell-id"; +const HIS_WARD_SYSTEM = "https://his.example.com/ward-id"; +const NATIONAL_ID_SYSTEM = "https://national-registry.example.com/patient-id"; +const LOCAL_ID_SYSTEM = "https://his.example.com/local-id"; + +// ============ Encounter Class ============ + +const INPATIENT_CLASS: Coding = { + system: "http://terminology.hl7.org/CodeSystem/v3-ActCode", + code: "IMP", + display: "inpatient encounter", +}; + +// ============ Mappers ============ + +/** + * Map HIS Patient to FHIR Patient resource + */ +export function mapPatient(hisPatient: HISPatient): Patient { + const identifiers: Identifier[] = [ + { + system: HIS_PATIENT_SYSTEM, + value: hisPatient.patientId, + }, + ]; + + // National ID + if (hisPatient.nationalIdentifier?.value) { + identifiers.push({ + system: NATIONAL_ID_SYSTEM, + value: hisPatient.nationalIdentifier.value, + }); + } + + // Local ID (Hospital Number) + if (hisPatient.localIdentifier?.value) { + identifiers.push({ + system: LOCAL_ID_SYSTEM, + value: hisPatient.localIdentifier.value, + }); + } + + // Build name + const names: HumanName[] = []; + if (hisPatient.forename || hisPatient.surname) { + const given: string[] = []; + if (hisPatient.forename) given.push(hisPatient.forename); + if (hisPatient.otherGivenNames) given.push(hisPatient.otherGivenNames); + + const name: HumanName = { + use: "official", + family: hisPatient.surname, + given: given.length > 0 ? given : undefined, + }; + + if (hisPatient.title?.description) { + name.prefix = [hisPatient.title.description]; + } + + names.push(name); + } + + // Preferred name + if (hisPatient.preferredName) { + names.push({ + use: "usual", + text: hisPatient.preferredName, + }); + } + + const patient: Patient = { + resourceType: "Patient", + id: hisPatient.patientId, + identifier: identifiers, + name: names.length > 0 ? names : undefined, + gender: mapGender(hisPatient.gender?.description), + birthDate: formatDate(hisPatient.doB), + }; + + if (hisPatient.doD) { + patient.deceasedDateTime = hisPatient.doD; + } + + return patient; +} + +/** + * Map gender string to FHIR gender code + */ +function mapGender( + gender?: string +): "male" | "female" | "other" | "unknown" | undefined { + if (!gender) return undefined; + + const lower = gender.toLowerCase(); + if (lower === "male" || lower === "m") return "male"; + if (lower === "female" || lower === "f") return "female"; + if (lower === "other" || lower === "o") return "other"; + return "unknown"; +} + +/** + * Format ISO datetime to FHIR date (YYYY-MM-DD) + */ +function formatDate(isoDateTime?: string): string | undefined { + if (!isoDateTime) return undefined; + const match = isoDateTime.match(/^(\d{4}-\d{2}-\d{2})/); + return match ? match[1] : isoDateTime; +} + +/** + * Map HIS CurrentInpatient to FHIR Encounter resource + */ +export function mapEncounter( + inpatient: CurrentInpatient, + patientRef: string, + locationRef: string +): Encounter { + const identifiers: Identifier[] = [ + { + system: HIS_SPELL_SYSTEM, + value: inpatient.spellId, + }, + ]; + + if (inpatient.externalSpellId) { + identifiers.push({ + system: `${HIS_SPELL_SYSTEM}/external`, + value: inpatient.externalSpellId, + }); + } + + const encounterLocation: EncounterLocation = { + location: { + reference: locationRef as `Location/${string}`, + display: inpatient.currentLocation?.wardName, + }, + status: "active", + }; + + // Add bed information as physical type + if (inpatient.currentLocation?.bedName) { + encounterLocation.physicalType = { + coding: [ + { + system: "http://terminology.hl7.org/CodeSystem/location-physical-type", + code: "bd", + display: "Bed", + }, + ], + text: inpatient.currentLocation.bedName, + }; + } + + const encounter: Encounter = { + resourceType: "Encounter", + id: inpatient.spellId, + identifier: identifiers, + status: mapEncounterStatus(inpatient.status), + class: INPATIENT_CLASS, + subject: { + reference: patientRef as `Patient/${string}`, + }, + location: [encounterLocation], + }; + + if (inpatient.admissionDate) { + encounter.period = { + start: inpatient.admissionDate, + }; + } + + const specialty = inpatient.currentInpatientEpisode?.currentSpecialty; + if (specialty?.specialtyCode || specialty?.specialtyName) { + encounter.serviceType = { + coding: specialty.specialtyCode + ? [ + { + system: "https://his.example.com/specialty", + code: specialty.specialtyCode, + display: specialty.specialtyName, + }, + ] + : undefined, + text: specialty.specialtyName, + }; + } + + return encounter; +} + +/** + * Map HIS status to FHIR Encounter status + */ +function mapEncounterStatus( + status?: string +): Encounter["status"] { + if (!status) return "in-progress"; + + const lower = status.toLowerCase(); + if (lower.includes("discharge") || lower.includes("finished")) return "finished"; + if (lower.includes("cancel")) return "cancelled"; + if (lower.includes("leave")) return "onleave"; + if (lower.includes("planned") || lower.includes("pending")) return "planned"; + if (lower.includes("arrived") || lower.includes("accepted")) return "arrived"; + + return "in-progress"; +} + +/** + * Map wardId to FHIR Location resource + */ +export function mapLocation(wardId: string, wardName?: string, siteName?: string): Location { + return { + resourceType: "Location", + id: wardId, + identifier: [ + { + system: HIS_WARD_SYSTEM, + value: wardId, + }, + ], + status: "active", + name: wardName, + description: siteName ? `${wardName} at ${siteName}` : wardName, + mode: "instance", + physicalType: { + coding: [ + { + system: "http://terminology.hl7.org/CodeSystem/location-physical-type", + code: "wa", + display: "Ward", + }, + ], + }, + }; +} + +// ============ Fat Event Mappers ============ + +/** + * Map ADT event patient data to FHIR Patient resource + */ +export function mapPatientFromEvent(data: ADTPatientData): Patient { + const identifiers: Identifier[] = [ + { + system: HIS_PATIENT_SYSTEM, + value: data.patientId, + }, + ]; + + if (data.nationalId) { + identifiers.push({ + system: NATIONAL_ID_SYSTEM, + value: data.nationalId, + }); + } + + if (data.localId) { + identifiers.push({ + system: LOCAL_ID_SYSTEM, + value: data.localId, + }); + } + + const names: HumanName[] = []; + if (data.forename || data.surname) { + const given: string[] = []; + if (data.forename) given.push(data.forename); + if (data.otherGivenNames) given.push(data.otherGivenNames); + + const name: HumanName = { + use: "official", + family: data.surname, + given: given.length > 0 ? given : undefined, + }; + + if (data.title) { + name.prefix = [data.title]; + } + + names.push(name); + } + + if (data.preferredName) { + names.push({ + use: "usual", + text: data.preferredName, + }); + } + + const patient: Patient = { + resourceType: "Patient", + id: data.patientId, + identifier: identifiers, + name: names.length > 0 ? names : undefined, + gender: mapGender(data.gender), + birthDate: formatDate(data.birthDate), + }; + + if (data.deceasedDateTime) { + patient.deceasedDateTime = data.deceasedDateTime; + } + + return patient; +} + +/** + * Map ADT event encounter data to FHIR Encounter resource + */ +export function mapEncounterFromEvent( + data: ADTEncounterData, + patientRef: string, + locationRef: string +): Encounter { + const status: Encounter["status"] = data.status ?? "in-progress"; + const identifiers: Identifier[] = [ + { + system: HIS_SPELL_SYSTEM, + value: data.spellId, + }, + ]; + + if (data.externalSpellId) { + identifiers.push({ + system: `${HIS_SPELL_SYSTEM}/external`, + value: data.externalSpellId, + }); + } + + const encounterLocation: EncounterLocation = { + location: { + reference: locationRef as `Location/${string}`, + display: data.wardName, + }, + status: "active", + }; + + if (data.bedName) { + encounterLocation.physicalType = { + coding: [ + { + system: "http://terminology.hl7.org/CodeSystem/location-physical-type", + code: "bd", + display: "Bed", + }, + ], + text: data.bedName, + }; + } + + const encounter: Encounter = { + resourceType: "Encounter", + id: data.spellId, + identifier: identifiers, + status, + class: INPATIENT_CLASS, + subject: { + reference: patientRef as `Patient/${string}`, + }, + location: [encounterLocation], + }; + + if (data.admissionDate) { + encounter.period = { + start: data.admissionDate, + }; + } + + if (data.dischargeDate && encounter.period) { + encounter.period.end = data.dischargeDate; + } + + if (data.specialtyCode || data.specialtyName) { + encounter.serviceType = { + coding: data.specialtyCode + ? [ + { + system: "https://his.example.com/specialty", + code: data.specialtyCode, + display: data.specialtyName, + }, + ] + : undefined, + text: data.specialtyName, + }; + } + + return encounter; +} + +/** + * Build a FHIR Bundle (collection) containing all ward resources + * Used by $get-ward-patients custom operation + */ +export function buildWardBundle( + wardId: string, + wardName: string | undefined, + siteName: string | undefined, + patientsData: WardPatientData[], + baseUrl?: string +): Bundle { + const url = baseUrl ?? ""; + const entries: BundleEntry[] = []; + const locationRef = `Location/${wardId}`; + + for (const data of patientsData) { + const patient = mapPatient(data.patient); + const patientRef = `Patient/${patient.id}`; + + const encounter = mapEncounter(data.inpatient, patientRef, locationRef); + entries.push({ + fullUrl: `${url}/Encounter/${encounter.id}`, + resource: encounter, + }); + + entries.push({ + fullUrl: `${url}/Patient/${patient.id}`, + resource: patient, + }); + } + + const location = mapLocation(wardId, wardName, siteName); + entries.push({ + fullUrl: `${url}/Location/${wardId}`, + resource: location, + }); + + return { + resourceType: "Bundle", + type: "collection", + total: patientsData.length, + entry: entries, + }; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/shared/his-client.ts b/aidbox-features/aidbox-canonical-mapping/src/shared/his-client.ts new file mode 100644 index 0000000..3f6f2d4 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/shared/his-client.ts @@ -0,0 +1,150 @@ +/** + * HIS (Hospital Information System) API Client + * OAuth 2.0 Client Credentials flow with token caching + */ + +import type { + HISTokenResponse, + CurrentInpatient, + CurrentInpatientResponse, + Patient, +} from "./types/his"; + +// ============ Configuration ============ + +export interface HISClientConfig { + baseUrl: string; + clientId: string; + clientSecret: string; + environment: string; + requestingProduct: string; +} + +// ============ Token Cache ============ + +interface CachedToken { + accessToken: string; + expiresAt: number; +} + +// ============ HIS Client ============ + +export class HISClient { + private config: HISClientConfig; + private tokenCache: CachedToken | null = null; + + constructor(config: HISClientConfig) { + this.config = config; + } + + /** + * Get a valid access token, refreshing if necessary + */ + private async getAccessToken(): Promise { + const now = Date.now(); + const bufferMs = 60_000; // Refresh 60s before expiry + + if (this.tokenCache && this.tokenCache.expiresAt > now + bufferMs) { + return this.tokenCache.accessToken; + } + + console.log("[HISClient] Fetching new access token..."); + + const tokenUrl = `${this.config.baseUrl}/oauth/token`; + + const response = await fetch(tokenUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + grant_type: "client_credentials", + client_id: this.config.clientId, + client_secret: this.config.clientSecret, + environment: this.config.environment, + }), + }); + + if (!response.ok) { + const error = await response.text(); + throw new Error(`Failed to get access token: ${response.status} - ${error}`); + } + + const tokenResponse = (await response.json()) as HISTokenResponse; + + this.tokenCache = { + accessToken: tokenResponse.access_token, + expiresAt: now + tokenResponse.expires_in * 1000, + }; + + console.log("[HISClient] Token obtained, expires in", tokenResponse.expires_in, "seconds"); + + return this.tokenCache.accessToken; + } + + /** + * Make an authenticated request to HIS API + */ + private async request(path: string): Promise { + const token = await this.getAccessToken(); + + const url = `${this.config.baseUrl}${path}`; + + console.log(`[HISClient] GET ${url}`); + + const response = await fetch(url, { + method: "GET", + headers: { + Authorization: `Bearer ${token}`, + "Requesting-Product": this.config.requestingProduct, + Accept: "application/json", + }, + }); + + if (!response.ok) { + const error = await response.text(); + throw new Error(`HIS API error: ${response.status} - ${error}`); + } + + return response.json() as Promise; + } + + /** + * Get current inpatients for a ward + */ + async getWardPatients(wardId: string): Promise { + const env = this.config.environment; + const path = `/api/${env}/Inpatient/v1/Wards/${wardId}/CurrentInpatients`; + + const response = await this.request(path); + return response.results ?? []; + } + + /** + * Get patient details by PatientId + */ + async getPatientDetails(patientId: string): Promise { + const env = this.config.environment; + const path = `/api/${env}/PatientService/v1/Patients/${patientId}`; + + return this.request(path); + } +} + +// ============ Factory ============ + +export function createHISClient(): HISClient { + const config: HISClientConfig = { + baseUrl: process.env.HIS_BASE_URL ?? "http://his:4000", + clientId: process.env.HIS_CLIENT_ID ?? "", + clientSecret: process.env.HIS_CLIENT_SECRET ?? "", + environment: process.env.HIS_ENVIRONMENT ?? "TEST", + requestingProduct: process.env.REQUESTING_PRODUCT ?? "FHIR-Facade/1.0.0", + }; + + if (!config.clientId || !config.clientSecret) { + throw new Error("HIS_CLIENT_ID and HIS_CLIENT_SECRET environment variables are required"); + } + + return new HISClient(config); +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/shared/test-data.ts b/aidbox-features/aidbox-canonical-mapping/src/shared/test-data.ts new file mode 100644 index 0000000..2180d99 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/shared/test-data.ts @@ -0,0 +1,220 @@ +/** + * Shared test data for HIS server and event publisher + * 7 sample patients in Ward 04 at General Hospital + */ + +import type { CurrentInpatient, Patient } from "./types/his"; +import type { ADTPatientData, ADTEncounterData } from "./types/events"; + +// ============ Ward ============ + +export const TEST_WARD_ID = "ward-001"; +export const TEST_WARD_NAME = "Ward 04"; +export const TEST_SITE_NAME = "General Hospital"; + +// ============ Patient Records ============ + +interface TestRecord { + patient: ADTPatientData; + encounter: Omit; +} + +export const TEST_PATIENTS: TestRecord[] = [ + { + patient: { + patientId: "patient-001", + localId: "H100001", + title: "Mr", + forename: "James", + surname: "Wilson", + gender: "Male", + birthDate: "1990-01-15", + }, + encounter: { + spellId: "spell-001", + externalSpellId: "EXT001", + bedName: "B05", + admissionDate: "2024-12-01T15:52:00Z", + specialtyCode: "100", + specialtyName: "General Surgery", + status: "arrived", + }, + }, + { + patient: { + patientId: "patient-002", + localId: "H100002", + title: "Mrs", + forename: "Sarah", + surname: "Johnson", + gender: "Female", + birthDate: "1985-06-20", + }, + encounter: { + spellId: "spell-002", + externalSpellId: "EXT002", + bedName: "B03", + admissionDate: "2024-12-02T09:00:00Z", + specialtyCode: "100", + specialtyName: "General Surgery", + status: "arrived", + }, + }, + { + patient: { + patientId: "patient-003", + localId: "H100003", + title: "Mr", + forename: "Robert", + surname: "Brown", + gender: "Male", + birthDate: "1972-03-10", + }, + encounter: { + spellId: "spell-003", + externalSpellId: "EXT003", + bedName: "B02", + admissionDate: "2024-12-03T11:44:00Z", + specialtyCode: "300", + specialtyName: "General Medicine", + status: "in-progress", + }, + }, + { + patient: { + patientId: "patient-004", + localId: "H100004", + title: "Ms", + forename: "Emily", + surname: "Davis", + gender: "Female", + birthDate: "1957-03-02", + }, + encounter: { + spellId: "spell-004", + externalSpellId: "EXT004", + admissionDate: "2024-12-14T11:00:00Z", + specialtyCode: "120", + specialtyName: "ENT", + status: "arrived", + }, + }, + { + patient: { + patientId: "patient-005", + nationalId: "NAT-9000001", + localId: "H100005", + title: "Mr", + forename: "Michael", + surname: "Taylor", + gender: "Male", + birthDate: "1965-10-10", + }, + encounter: { + spellId: "spell-005", + externalSpellId: "EXT005", + bedName: "B01", + admissionDate: "2024-12-20T09:00:00Z", + specialtyCode: "101", + specialtyName: "Urology", + status: "arrived", + }, + }, + { + patient: { + patientId: "patient-006", + nationalId: "NAT-9000002", + localId: "H100006", + title: "Miss", + forename: "Anna", + otherGivenNames: "Marie", + surname: "Martinez", + gender: "Female", + birthDate: "1998-02-28", + }, + encounter: { + spellId: "spell-006", + externalSpellId: "EXT006", + admissionDate: "2024-12-22T15:35:00Z", + specialtyCode: "100", + specialtyName: "General Surgery", + status: "arrived", + }, + }, + { + patient: { + patientId: "patient-007", + nationalId: "NAT-9000003", + localId: "H100007", + title: "Mrs", + forename: "Patricia", + surname: "Garcia", + gender: "Female", + birthDate: "1992-04-06", + }, + encounter: { + spellId: "spell-007", + externalSpellId: "EXT007", + admissionDate: "2025-01-11T11:58:00Z", + specialtyCode: "100", + specialtyName: "General Surgery", + status: "arrived", + }, + }, +]; + +// ============ HIS API Format Converters ============ + +/** + * Convert test record to HIS CurrentInpatient format + */ +export function toCurrentInpatient(record: TestRecord): CurrentInpatient { + return { + spellId: record.encounter.spellId, + patientId: record.patient.patientId, + externalSpellId: record.encounter.externalSpellId, + admissionDate: record.encounter.admissionDate, + status: record.encounter.status, + currentLocation: { + wardId: TEST_WARD_ID, + wardName: TEST_WARD_NAME, + siteName: TEST_SITE_NAME, + bedName: record.encounter.bedName, + }, + currentInpatientEpisode: { + currentSpecialty: { + specialtyCode: record.encounter.specialtyCode, + specialtyName: record.encounter.specialtyName, + }, + }, + patient: { + patientName: `${record.patient.forename} ${record.patient.surname}`, + localNumber: record.patient.localId, + dateOfBirth: record.patient.birthDate, + patientGender: record.patient.gender, + }, + }; +} + +/** + * Convert test record to HIS Patient format + */ +export function toHISPatient(record: TestRecord): Patient { + return { + patientId: record.patient.patientId, + title: record.patient.title + ? { id: record.patient.title.toLowerCase(), description: record.patient.title } + : undefined, + gender: { id: record.patient.gender.toLowerCase(), description: record.patient.gender }, + doB: record.patient.birthDate, + forename: record.patient.forename, + surname: record.patient.surname, + otherGivenNames: record.patient.otherGivenNames, + localIdentifier: record.patient.localId + ? { value: record.patient.localId } + : undefined, + nationalIdentifier: record.patient.nationalId + ? { value: record.patient.nationalId } + : undefined, + }; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/shared/types/events.ts b/aidbox-features/aidbox-canonical-mapping/src/shared/types/events.ts new file mode 100644 index 0000000..988a790 --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/shared/types/events.ts @@ -0,0 +1,49 @@ +/** + * ADT Event Types (Fat Events) + * Admit/Discharge/Transfer events from HIS with full patient/encounter data + */ + +export type ADTAction = "admit" | "discharge" | "transfer"; + +export interface ADTPatientData { + patientId: string; + nationalId?: string; + localId?: string; + title?: string; + forename: string; + surname: string; + otherGivenNames?: string; + preferredName?: string; + gender: string; + birthDate: string; + deceasedDateTime?: string; +} + +export interface ADTEncounterData { + spellId: string; + externalSpellId?: string; + wardId: string; + wardName: string; + siteName?: string; + bedName?: string; + admissionDate: string; + dischargeDate?: string; + specialtyCode?: string; + specialtyName?: string; + status?: "planned" | "arrived" | "triaged" | "in-progress" | "onleave" | "finished" | "cancelled"; +} + +export interface ADTEvent { + eventType: "ADT"; + action: ADTAction; + timestamp: string; + patient: ADTPatientData; + encounter: ADTEncounterData; +} + +export interface EventEnvelope { + id: string; + source: string; + timestamp: string; + payload: ADTEvent; +} diff --git a/aidbox-features/aidbox-canonical-mapping/src/shared/types/his.ts b/aidbox-features/aidbox-canonical-mapping/src/shared/types/his.ts new file mode 100644 index 0000000..a6e516b --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/src/shared/types/his.ts @@ -0,0 +1,117 @@ +/** + * HIS (Hospital Information System) API Response Types + * Generic types representing a proprietary hospital system API + */ + +// ============ OAuth Token Response ============ + +export interface HISTokenResponse { + access_token: string; + token_type: string; + expires_in: number; +} + +// ============ Common Types ============ + +export interface LookupItem { + id: string; + description?: string; +} + +export interface NumberIdentifier { + value?: string; + numberType?: LookupItem; +} + +// ============ Inpatient API ============ + +export interface InpatientLocation { + siteId?: string; + siteName?: string; + wardId?: string; + wardName?: string; + bayId?: string; + bayName?: string; + bedId?: string; + bedName?: string; +} + +export interface HealthcareProfessional { + hcpId?: string; + hcpName?: string; +} + +export interface Specialty { + specialtyId?: string; + specialtyName?: string; + specialtyCode?: string; +} + +export interface InpatientEpisode { + episodeId?: string; + patientId?: string; + currentHealthcareProfessional?: HealthcareProfessional; + currentSpecialty?: Specialty; +} + +export interface InpatientPatientSummary { + patientName?: string; + localNumber?: string; + nationalNumber?: string; + dateOfBirth?: string; + patientGender?: string; +} + +export interface CurrentInpatient { + spellId: string; + patientId: string; + externalSpellId?: string; + admissionDate?: string; + currentInpatientEpisode?: InpatientEpisode; + currentLocation?: InpatientLocation; + patient?: InpatientPatientSummary; + status?: string; +} + +export interface PaginationList { + pageIndex: number; + pageSize: number; + totalCount: number; + totalPages: number; + results: T[]; +} + +export type CurrentInpatientResponse = PaginationList; + +// ============ Patient API ============ + +export interface Address { + addressLine1?: string; + addressLine2?: string; + city?: string; + state?: string; + postalCode?: string; + country?: LookupItem; +} + +export interface Patient { + patientId: string; + title?: LookupItem; + gender?: LookupItem; + doB?: string; + doD?: string; + forename?: string; + surname?: string; + otherGivenNames?: string; + preferredName?: string; + localIdentifier?: NumberIdentifier; + nationalIdentifier?: NumberIdentifier; + currentAddress?: Address; +} + +// ============ Combined Ward Data ============ + +export interface WardPatientData { + inpatient: CurrentInpatient; + patient: Patient; +} diff --git a/aidbox-features/aidbox-canonical-mapping/tsconfig.json b/aidbox-features/aidbox-canonical-mapping/tsconfig.json new file mode 100644 index 0000000..62fd5bd --- /dev/null +++ b/aidbox-features/aidbox-canonical-mapping/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "target": "ESNext", + "module": "Preserve", + "moduleDetection": "force", + + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + "noUnusedLocals": false, + "noUnusedParameters": false, + + "types": ["bun"] + }, + "include": ["src/**/*", "scripts/**/*"], + "exclude": ["node_modules"] +}