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.
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.
| Use | URI |
|---|---|
| National ID card (10 digits) proposed | https://fhir.cuida.example/ec/id/cedula |
| Passport proposed | https://fhir.cuida.example/ec/id/pasaporte |
| Tax ID (RUC) proposed | https://fhir.cuida.example/ec/id/ruc |
| Health facility proposed | https://fhir.cuida.example/ec/id/establecimiento |
| Health professional proposed | https://fhir.cuida.example/ec/id/profesional |
Validation rules
The validator in /interop applies exactly these rules.
| Rule | Resource | Severity | Description |
|---|---|---|---|
| EC-PAT-1 | Patient | error | At least one identifier with cédula, passport or RUC system.Patient.identifier |
| EC-PAT-2 | Patient | warning | Cédula has 10 digits (the check digit is validated in production, not in this draft).Patient.identifier |
| EC-PAT-3 | Patient | warning | Family name carries two surnames (paternal and maternal).Patient.name.family |
| EC-PAT-4 | Patient | warning | Birth date and gender present.Patient.birthDate |
| EC-ENC-1 | Encounter | error | Encounter references its patient.Encounter.subject |
| EC-ENC-2 | Encounter | warning | Encounter records its start.Encounter.period.start |
| EC-CON-1 | Condition | error | Diagnosis is coded with ICD-10 (system http://hl7.org/fhir/sid/icd-10).Condition.code |
| EC-CON-2 | Condition | error | ICD-10 code has a valid format (e.g. E11.9).Condition.code.coding.code |
| EC-OBS-1 | Observation | error | Observation carries a value, components with a value (e.g. blood pressure) or a data-absent reason.Observation.value[x] |
| EC-OBS-2 | Observation | warning | Numeric values include a unit.Observation.valueQuantity |
| EC-OBS-3 | Observation | warning | Lab tests are coded with LOINC.Observation.code |
| EC-ORG-1 | Organization | warning | The 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 v2 | FHIR R4 | HCU reference (pending) | Note |
|---|---|---|---|
| PID-3 | Patient.identifier | HCU 001 · Datos del paciente | Cédula (NI), passport (PPN) or RUC (TAX) by assigning authority; proposed systems. |
| PID-5 | Patient.name | HCU 001 · Apellidos y nombres | family keeps both surnames; humanname-own-name and mothers-family extensions. |
| PID-7 · PID-8 | Patient.birthDate · Patient.gender | HCU 001 · Fecha de nacimiento, sexo | |
| PID-11 · PID-13 | Patient.address · Patient.telecom | HCU 001 · Residencia, contacto | |
| PV1-2 | Encounter.class | HCU 001 / 002 · Tipo de atención | I→IMP, E→EMER, O→AMB, P→PRENC; telehealth is marked VR. |
| PV1-3 | Encounter.location | HCU 001 · Servicio / habitación | |
| PV1-7 | Encounter.participant → Practitioner | HCU 002 · Profesional responsable | |
| PV1-19 | Encounter.identifier | HCU 001 · Número de atención | |
| PV1-44 · PV1-45 | Encounter.period.start · .end | HCU 001 · Admisión y alta | |
| AL1 | AllergyIntolerance | HCU 002 · Antecedentes alérgicos | |
| DG1-3 | Condition.code (CIE-10) | HCU 002 / 005 · Diagnósticos | System http://hl7.org/fhir/sid/icd-10; code is checked for ICD-10 format. |
| OBR-4 · OBR-25 | DiagnosticReport.code · .status | HCU 010A · Informe de laboratorio | |
| OBX-3 | Observation.code (LOINC) | HCU 010A · Examen | |
| OBX-5 · OBX-6 | Observation.value[x] · valueQuantity.unit | HCU 010A · Resultado y unidad | NM→valueQuantity, ST/TX→valueString, CWE→valueCodeableConcept, SN→valueQuantity with comparator. |
| OBX-7 · OBX-8 | Observation.referenceRange · .interpretation | HCU 010A · Valores de referencia, alertas | |
| ORC · OBR | ServiceRequest | HCU 010A · Solicitud de examen | NW→active, CA/DC→revoked, HD→on-hold. |
| SCH-11 · SCH-9 | Appointment.start · .end | — (agenda; sin formulario HCU) | |
| AIP · AIL | Appointment.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.
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).