Cuida
DoctorFront deskPatientCenterInteroperabilityEspañol
Fictional data · demo version
Cuida EC Core v0.1 · draft, pending validation
EC Core 0.1.0-borradorproposed

Cuida EC Core

Draft of an open standard for electronic health records in Ecuador, interoperable through HL7 v2 and FHIR R4.

v0.1 · draft, pending validation by a health professional and Ecuador's Ministry of Public Health (MSP). It does not claim official conformance.

On this page

  • Goal
  • Principles
  • Proposed identifiers
  • Validation rules
  • HL7 v2 ↔ FHIR ↔ HCU mapping
  • Supported HL7 v2 messages
  • Downloadable examples
  • Reference API
  • Versioning
  • Pending validation
  • Roadmap

Goal

Any Ecuadorian system and any medical device should be able to write and read the same record, without a custom translator for every center.

Principles

  • A single source of truth: the rules, the mapping and this documentation are generated from the same code.
  • FHIR R4 as the data model; HL7 v2.5 as the bridge to existing equipment.
  • Minimum data first: national ID, names with two surnames, ICD-10 diagnoses and LOINC results.
  • Open specification; Cuida sells the platform and the connectors.
  • Honesty: anything not validated is labeled as proposed.

Proposed identifiers

Example URIs, pending validation. They are not official identifiers.

UseURI
National ID card (10 digits) proposedhttps://fhir.cuida.example/ec/id/cedula
Passport proposedhttps://fhir.cuida.example/ec/id/pasaporte
Tax ID (RUC) proposedhttps://fhir.cuida.example/ec/id/ruc
Health facility proposedhttps://fhir.cuida.example/ec/id/establecimiento
Health professional proposedhttps://fhir.cuida.example/ec/id/profesional

Validation rules

The validator in /interop applies exactly these rules.

RuleResourceSeverityDescription
EC-PAT-1PatienterrorAt least one identifier with cédula, passport or RUC system.Patient.identifier
EC-PAT-2PatientwarningCédula has 10 digits (the check digit is validated in production, not in this draft).Patient.identifier
EC-PAT-3PatientwarningFamily name carries two surnames (paternal and maternal).Patient.name.family
EC-PAT-4PatientwarningBirth date and gender present.Patient.birthDate
EC-ENC-1EncountererrorEncounter references its patient.Encounter.subject
EC-ENC-2EncounterwarningEncounter records its start.Encounter.period.start
EC-CON-1ConditionerrorDiagnosis is coded with ICD-10 (system http://hl7.org/fhir/sid/icd-10).Condition.code
EC-CON-2ConditionerrorICD-10 code has a valid format (e.g. E11.9).Condition.code.coding.code
EC-OBS-1ObservationerrorObservation carries a value, components with a value (e.g. blood pressure) or a data-absent reason.Observation.value[x]
EC-OBS-2ObservationwarningNumeric values include a unit.Observation.valueQuantity
EC-OBS-3ObservationwarningLab tests are coded with LOINC.Observation.code
EC-ORG-1OrganizationwarningThe health facility carries its identifier (proposed system, to be validated with MSP).Organization.identifier

HL7 v2 ↔ FHIR ↔ HCU mapping

How a data point travels between an HL7 v2 device, a FHIR resource and the MSP's single clinical record (HCU) form. HCU references are a proposal pending validation.

HL7 v2FHIR R4HCU reference (pending)Note
PID-3Patient.identifierHCU 001 · Datos del pacienteCédula (NI), passport (PPN) or RUC (TAX) by assigning authority; proposed systems.
PID-5Patient.nameHCU 001 · Apellidos y nombresfamily keeps both surnames; humanname-own-name and mothers-family extensions.
PID-7 · PID-8Patient.birthDate · Patient.genderHCU 001 · Fecha de nacimiento, sexo
PID-11 · PID-13Patient.address · Patient.telecomHCU 001 · Residencia, contacto
PV1-2Encounter.classHCU 001 / 002 · Tipo de atenciónI→IMP, E→EMER, O→AMB, P→PRENC; telehealth is marked VR.
PV1-3Encounter.locationHCU 001 · Servicio / habitación
PV1-7Encounter.participant → PractitionerHCU 002 · Profesional responsable
PV1-19Encounter.identifierHCU 001 · Número de atención
PV1-44 · PV1-45Encounter.period.start · .endHCU 001 · Admisión y alta
AL1AllergyIntoleranceHCU 002 · Antecedentes alérgicos
DG1-3Condition.code (CIE-10)HCU 002 / 005 · DiagnósticosSystem http://hl7.org/fhir/sid/icd-10; code is checked for ICD-10 format.
OBR-4 · OBR-25DiagnosticReport.code · .statusHCU 010A · Informe de laboratorio
OBX-3Observation.code (LOINC)HCU 010A · Examen
OBX-5 · OBX-6Observation.value[x] · valueQuantity.unitHCU 010A · Resultado y unidadNM→valueQuantity, ST/TX→valueString, CWE→valueCodeableConcept, SN→valueQuantity with comparator.
OBX-7 · OBX-8Observation.referenceRange · .interpretationHCU 010A · Valores de referencia, alertas
ORC · OBRServiceRequestHCU 010A · Solicitud de examenNW→active, CA/DC→revoked, HD→on-hold.
SCH-11 · SCH-9Appointment.start · .end— (agenda; sin formulario HCU)
AIP · AILAppointment.participant— (agenda; sin formulario HCU)

Supported HL7 v2 messages

  • ADT^A01
  • ADT^A03
  • ADT^A04
  • ADT^A05
  • ADT^A08
  • ADT^A28
  • ADT^A31
  • ORU^R01
  • ORM^O01
  • SIU^S12
  • SIU^S13
  • SIU^S14
  • SIU^S15
  • SIU^S26

Downloadable examples

Each example is available as an HL7 v2 message and as the equivalent FHIR Bundle.

  • ADT^A01 · Admisión (Clínica Norte, Quito)HL7 v2FHIR JSON
  • ADT^A03 · AltaHL7 v2FHIR JSON
  • ORU^R01 · Resultado de laboratorio (HbA1c y glucosa)HL7 v2FHIR JSON
  • ORM^O01 · Orden de laboratorioHL7 v2FHIR JSON
  • SIU^S12 · Nueva citaHL7 v2FHIR JSON

Reference API

Demo server (fictional data, isolated session).

  • CapabilityStatementGET /api/fhir/r4/metadata
  • Translate HL7 v2 → FHIRPOST /api/hl7/traducir
  • Validate a resourcePOST /api/validar
  • List the rulesGET /api/validar

Versioning

Semantic versioning is used. 0.x versions are drafts and may change without notice; 1.0 will require clinical and MSP review.

Changelog

0.1.02026-11-29First draft: Patient, Encounter, Condition, Observation and Organization profiles; ADT, ORU, ORM and SIU mapping.

Pending validation

  • MSP HCU forms and how they map to resources.
  • Official identifiers for health facilities and professionals.
  • Ethnicity and self-identification coding.
  • LOPDP (data protection law) requirements for each resource and exchange.
  • Demographic updates via ADT^A08: the demo does not overwrite existing patients (creation is conditional on the identifier).

Roadmap

Next stage, no demo yet

  • Imaging: ImagingStudy with DICOMweb (QIDO-RS, WADO-RS) and IHE XDS-I.
  • Monitoring devices: Observation with IEEE 11073 (MDC) codes.
  • Medication: local terminology and dispensing.
  • Electronic signature of clinical documents.
  • Public repository with an open license and a change process (RFC).