ICD-11 Related Tables — ClinicCare/HATI-EHR Backend

  This is a Java/Spring Boot microservices project (not Laravel — no database/migrations folder; schema is Hibernate/JPA-managed). Here's what's relevant to ICD-11:

  Current state: no ICD-11 support exists

  The only classification enum today is CodeType.java with RXNORM_CODE, SNOMED_CT_CODE, LOINC_CODE, CPT_CODE, ICD_10_CODE — no ICD-11 value. There's also no ICD-9/legacy table to "replace" — everything is flattened into a
  generic code-set schema.

  Tables to use/extend for ICD-11 (Core-Service, domain/entity/code_set/)

  ┌─────────────────────────────────────┬──────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
  │                Table                │                Model                 │                                                                   Key columns                                                                   │
  ├─────────────────────────────────────┼──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ clinical_code_set                   │ ClinicalCodeSet.java                 │ id, name, description, FK common_name_category_id → ClinicalCommonNameCategory — one row would represent "ICD-11" as a classification system    │
  ├─────────────────────────────────────┼──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ clinical_code_set_value             │ ClinicalCodeSetValue.java            │ id, name, description, code, FK code_set_id → clinical_code_set, FK code_set_value_type → SystemMaster — this is where individual ICD-11 codes  │
  │                                     │                                      │ would be seeded (unique on code+code_set_id+name+type)                                                                                          │
  ├─────────────────────────────────────┼──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ clinical_code_set_top               │ ClinicalCodeSetTop.java              │ favorites/recents: FK clinical_code_set_value_id, physician_id, ordering_site_id, is_favourite, admit_type                                      │
  ├─────────────────────────────────────┼──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ diagnosis_code_set_value_attributes │ DiagnosisCodeSetValueAttributes.java │ FK code_set_value_id/code_set_value_code, FK gender_id/gender_code, age_category_fields (jsonb) — age/gender restrictions per diagnosis code    │
  ├─────────────────────────────────────┼──────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ order_set_linked_diagnosis          │ OrdersetLinkedDiagnosis.java         │ diagnosis_code (plain string, not FK), FK order_set_id                                                                                          │
  └─────────────────────────────────────┴──────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Patient diagnosis records (MongoDB, not SQL — duplicated across Clinical-Service, IPD-Clinical-Service, Pharmacy-Service)

  - encounter_clinical_event_store collection → CurrentDiagnosisEvent.java / PastDiagnosisEvent.java, embedding PatientDiagnosis.java (fields: identifier, name, description, identifierCode — the actual diagnosis code, no
  coding-system discriminator, isPrincipal, isProvisional, diagnosisType, etc.)
  - Multi-axial variants for psychiatric use: CurrentMultiAxialDiagnosisEvent.java / PastMultiAxialDiagnosisEvent.java

  Gap for your issue: PatientDiagnosis.identifierCode has no field tagging which coding system the code belongs to (ICD-10 vs ICD-11), so once ICD-11 values are seeded into clinical_code_set_value, there's currently no way to
  distinguish an ICD-10 selection from an ICD-11 selection downstream in the Mongo record.

  No importer/seeder exists for loading ICD-11 data (no CSV/JSON seed files, no Liquibase/Flyway scripts) — that would need to be built for the Sandbox upload, and the same seed data can then be exported/replayed against the UAT environment for migration.
