IF Commons GitHub

Integrations FHIR plugin

0001Active

0001-integrations-fhir-plugin · owner if · domain commons

Requirements

FR-001checkpassing

The plugin MUST register FHIR JSON, FHIR NDJSON, FHIR R4 and US Core as entries with a licence as data (an SPDX identifier, what is allowed, the text that cites the terms); because embedding is not verified here, each MUST be user-supplied, and the package MUST embed no content of any standard (EMBEDDED is empty and passes the publication gate).

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: the entries and an empty embedded list

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/about.ts, integrations-fhir/library.ts, integrations-fhir/src/mod.ts, integrations-fhir/tools/check.ts, integrations-fhir/tools/pack.ts

Tests: passed: suite/fhir.test.ts the entries carry a licence as data, and nothing is embedded

FR-002checkpassing

The JSON codec MUST read a resource into one transaction whose id is its resourceType and write it back so that reading the result gives the same tree, and the NDJSON codec MUST do the same for one resource a line; both MUST pass conformPlugin of Integrations.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: round trips and conformance

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts the codec round-trips JSON and NDJSON, and the plugins pass the conformance suite

FR-003checkpassing

The JSON codec MUST write as an array every path in the set of repeating paths it is given (from the StructureDefinitions, repeatingPaths) and any id that occurs twice, so that a resource with one occurrence of a repeating element is written as FHIR says.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: a repeating path is written as an array

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts the codec round-trips JSON and NDJSON, and the plugins pass the conformance suite

FR-004checkpassing

A text that is not FHIR MUST be a syntax failure with a code and an offset that holds no part of the text.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: a syntax failure holds none of the text

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts a syntax failure holds none of the text

FR-005checkpassing

The loader MUST read StructureDefinitions, CodeSystems and ValueSets only from a source the licence allows, into a schema (and a profile where the definition is a constraint) with cardinalities and bindings, and terminologies with their codes; a resource MUST then validate against them with findings that hold no value.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: definitions are loaded from supplied data and validate a resource

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts definitions are loaded from supplied data only, and a StructureDefinition validates a reso

FR-006checkpassing

The acknowledgement port MUST make an OperationOutcome from a status (information, warning, error) and read it back into an acknowledgement whose status is the one made and whose findings hold no value.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: OperationOutcome made and read back

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts an OperationOutcome is made from a status and read back into findings with no value

FR-007checkpassing

The plugin MUST be a standards plugin of Integrations whose codec is the JSON syntax and whose loader is for FHIR R4.

Enforced (check): .github: cd commons/integrations-fhir && bun run verify — suite/fhir.test.ts: the plugin keeps to the ports

Proved by: integrations-fhir/suite/fhir.test.ts

Written in: integrations-fhir/src/mod.ts

Tests: passed: suite/fhir.test.ts the plugin keeps to Integrations' ports and names no code of another standard

Acceptance scenarios

  1. Given the synthetic fixtures of the suite, When the conformance suites of Integrations run over this plugin, Then they find nothing, per FR-001.

Out of scope

  • Everything the plugin does not list above: Planned, and specified in commons integrations 0007-integrations-standards where it is a standard.

Edge cases

  • A fixture that would be real data: never, every fixture is made up, per FR-001.

Assumptions

  • FHIR XML and choice-type expansion are Planned; fixtures are made up, never real records.

Open questions

  • None.

Key entities

  • Integrations FHIR - the plugin.

Success criteria

SC-001success criterion

The plugin passes the conformance suite of Integrations.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Cited by

Integrations FHIR, mod

Titles, headings, exports, tables, columns and requirements. Esc closes.