VinAllergy Mock API

Local stand-in for the HTVH EForm gateway — VinAllergy report APIs + legacy CLS results — so ArmedARIS can be tested end-to-end before the real upstream exists.

Next.js · Node 24default port 8090lenient auth by default
Point ArmedARIS at this server:
INTERNAL_VINMEC_BASE_URL=http://localhost:8090
EFORM_CLS_BASE_URL=http://localhost:8090 (+ any non-empty INTERNAL_VINMEC_CLIENT_ID / INTERNAL_VINMEC_CLIENT_SECRET, or the VinAllergy client short-circuits before calling).
Testing the inbound direction? The endpoints below are the ones ArmedARIS calls. To exercise the ones ArmedARIS receives— the EForm examination & prescription webhooks and the PAP lookup — open the ▶ inbound webhook console. It fires the ready-to-paste requests (payloads editable per-send) at ArmedARIS with the x-eform-secret header, and can also override what the endpoints below return when ArmedARIS calls them.
Want the doctor's-eye view? The ▶ outpatient EMR & prescription screen simulates a doctor writing an examination + prescription: it reads the patient's allergy profile (PAP · API 4) as decision support, then submits — pinning the §7–§9 outbound responses to what was typed and firing the examination + prescription webhooks at ArmedARIS.

VinAllergy — HTVH EForm report APIs (VHYTMUSE-380) · §7 + §8

GET/orient-health/api/v1/patients/{pid}/visits/{visitCode}/specimens

Returns one specimen number (SID) per §7 routine analyte, plus one SID for the whole specific-IgE panel — the SIDs you then pass to /lab-results. Requires x-facility-code.

/orient-health/api/v1/patients/200277816/visits/58838/specimens
GET/orient-health/api/v1/lab-results/{sid}

§7 source: a single lab analyte per SID, or the whole specific-IgE allergen panel (kUA/L) from the one panel SID. Requires x-facility-code.

/orient-health/api/v1/lab-results/010124-7558730
GET/orient-health/api/v1/patients/{pid}/visits/{visitCode}/radiology-reports

§8 source: X-Ray / CT / MRI reports with htmlData, conclusion and a gzip+base64 fullData blob.

/orient-health/api/v1/patients/200277816/visits/58838/radiology-reports
GET/hospital-info/api/v1/emr/diagnostic-reports/conclusions?visitCode={visitCode}&visitType={visitType}

Clinical conclusions for functional-diagnostic / rehab services in a visit.

/hospital-info/api/v1/emr/diagnostic-reports/conclusions?visitCode=296863&visitType=VMHC

CLS results API (SyncLabAndXrayResultsByPid) · §9 clinicalTests

GET/api/SyncLabAndXrayResultsByPid/{site}/{pid}

§9 source: XetNghiem / CDHA / DiagnosticReporting / Sites keyed by patient id. The DiagnosticReporting section carries the §9 clinical tests (skin-prick / intradermal / provocation / pulmonary-function), each with Findings (Mô tả) + Impression (Kết luận). Requires Authorization header. `site` may be empty (double slash), as in the upstream sample.

/api/SyncLabAndXrayResultsByPid//200530408

EForm form APIs (examinations + prescriptions)

GET/api/prescriptions?patientId={C_PID}

Every prescription EForm holds for a C_PID, newest first — the account-linking backfill. Each row matches the data field of GET /api/prescriptions/{prescriptionId}: { origin, prescribedAt, items }, with items carrying the raw nested Pharmacies[]. A patient with no prescriptions gets 200 + data: [] (not a 404) — try C_PID-9999. Auth TBD by VSF.

/api/prescriptions?patientId=C_PID-1001