Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


id: TEDY.17.4 template: tool-feature module: tedy state: Built traces-from: [] source-refs:

  • reference-editor/app/src/app/integration/import/icd-10/integration-icd-import.component.ts
  • reference-editor/app/src/app/integration/import/integration-import.component.ts (shared base for server-fetch importers)
  • reference-editor/app/src/app/integration/_lib/icd-10/service/integration-icd-lib.service.ts
  • reference-editor/app/src/app/integration/import/file-import/code-system/orphanet/orphanet-import.component.ts
  • reference-editor/app/src/app/integration/_lib/orphanet/service/integration-orphanet-lib.service.ts
  • reference-editor/app/src/app/integration/import/loinc/loinc-import.component.ts
  • reference-editor/app/src/app/integration/_lib/bob/service/bob-lib.service.ts
  • reference-editor/app/src/app/integration/_lib/model/integration-import-configuration.ts author: TEDY bootstrap created: 2026-08-09 updated: 2026-08-09

TEDY.17.4 – External Source Imports (ICD-10 · Orphanet · LOINC)

Feature grouping

Child of TEDY.17 – File & Source Import (Common Spec). Siblings: TEDY.17.1 CS, TEDY.17.2 VS, TEDY.17.3 MS.

Description

Import three well-known external terminologies. Each is its own pattern, but all report through the shared job log (TEDY.17). Built after CS/VS/MS.

Shared request model — IntegrationImportConfiguration

Used by ICD-10 and Orphanet: { sourceUrl, uri, publisher, version, validFrom, validTo, codeSystem, baseCodeSystem, codeSystemName, codeSystemDescription, codeSystemVersionDescription, status, generateValueSet, cleanRun, cleanConceptRun }. Static prefill factories exist for ICD-10 (int edition) and Orphanet.

1. WHO ICD-10 — server-side URL fetch

  • UI: a single config form (the reference “integration import” base form): Source URL (required), URI (required), Publisher, Version (required), Valid from (required) / Valid to, target Code System (required), Base Code System, Code System name (multi-language, required) + description + version description. A Set default data button prefills WHO defaults (a hosted zip URL + uri http://hl7.org/fhir/sid/icd-10, publisher “World Health organization”, version 10, codeSystem icd10, name “ICD-10 WHO Edition”). Send request submits.
  • Endpoint: POST /icd10/import?url={sourceUrl} with the IntegrationImportConfiguration JSON body. The server downloads and parses the zip at sourceUrl — no browser file upload, no column mapping.
  • Job: background; reference polls every 5 s (TEDY will use the shared 3 s useImportJob). edition is a query context (int).

2. Orphanet — extends the CS file importer

  • UI: the generic CS file-import form (destination CS + version + options) plus a source card (link | file). No column mapping (server knows the Orphanet XML schema).
  • Endpoint: POST /orphanet/import, multipart request (IntegrationImportConfiguration built from the CS form: sourceUrl ← source.file, uri/codeSystem/codeSystemName/codeSystemDescription ← codeSystem.*, version ← codeSystemVersion.version, status, validFrom ← releaseDate, plus generateValueSet/cleanRun/cleanConceptRun) + optional file.
  • Job: background (shared poll). Tutorial id example: orpha-rare-diseases.

3. LOINC — Bob archive + slot mapping (two-phase)

  • UI: Version select (distinct versions across stored archives), Language (languages value set), LOINC archive select (when >1 match), and — once an archive is chosen — a per-slot CSV select for each of 8 slots: parts (Parts), terminology (LoincPartLink_Primary), supplementary-properties (LoincPartLink_Supplementary), panels (Panels and forms), answer-list, answer-list-link, order-observation (LoincUniversalLabOrdersValueSet), translations (<lang>LinguisticVariant). Each slot lists the zip’s .csv entries with a server-suggested one marked and a “(none — use server default)” option. Import opens a confirmation modal.
  • Upload (phase 1): the zip goes to the object store — POST /bob/objects (multipart container=loinc, file, meta {version, language}); version auto-detected from Loinc_<version>.zip. List via GET /bob/objects?container=loinc; inner entries via GET /loinc/archives/{uuid}/files?language=.
  • Import (phase 2): POST /loinc/import/from-archive JSON { archiveUuid, version, language, fileMap? } where fileMap maps slot → CSV entry (omit a slot to use the server default). Target Code System is loinc.
  • Job: background (shared poll).

All three are panels in the Integration → Import dashboard’s left menu (grouped: LOINC · ICD-10 · Orphanet), per TEDY.17. ICD-10/Orphanet reuse the config/CS-form UI; LOINC is bespoke (archive picker + slot mapper + confirm modal).

Out of scope (noted for later)

ATC (same server-fetch pattern as ICD-10, int/est editions) and UCUM (essence XML upload, modal) exist in the reference editor and are not part of this family’s build.

Testing

Per TEDY.17 → Testing. External-source units: ICD-10Set default data prefill (WHO defaults for the int edition) and the /icd10/import?url= request builder; Orphanet — the IntegrationImportConfiguration built from the embedded CS form (sourceUrl ← source.file, validFrom ← releaseDate, etc.); LOINCfileMap slot pruning (drop empty slots, undefined when all default) and version auto-detect from Loinc_<version>.zip. Reuse the shared useImportJob tests. Server fetch/parse is verified manually against htx.helex.dev/lmb (no backend VS/MS/external import tests exist to lean on).

Acceptance

  • ICD-10: Set default data → Send request → JobLog to completion; icd10 CS populated.
  • Orphanet: CS form + file/link → import → JobLog; CS created/updated.
  • LOINC: upload a Loinc_<v>.zip, pick slots (or defaults), confirm → JobLog; loinc CS populated.
  • tsc clean; en/et/ru i18n in sync; verified against htx.helex.dev/lmb.