Complex posologies (detect_complex_posology)
The detect_complex_posology option (a boolean in the prescription scan request body, false by default) enables a whole-prescription analysis, designed for prescriptions whose regimens go beyond a simple line: infusions and injectables (home hospitalisation), multi-phase taperings, parenteral nutrition, multi-line instructions.
Request
{
"images": [{ "image": "<base64>", "isPdf": true }],
"detect_complex_posology": true
}If the advanced analysis is unavailable, the scan automatically falls back to the standard pipeline: the request always succeeds, with the usual level of structuring.
What changes in the FHIR bundle
The overall bundle format is unchanged (Prescription export model). The option enriches each MedicationRequest with the following elements, whenever the prescription states them.
dosageInstruction.method — administration technique
The administration technique is coded in SNOMED CT:
| Prescription wording | SNOMED code | Display |
|---|---|---|
| IV infusion | 14152002 | Intravenous infusion |
| Direct IV / slow IV | 43060002 | Intravenous injection |
| Fast IV, bolus, flash | 447963004 | Intravenous push technique |
| Portable diffuser, ambulatory pump | 261754007 | Continuous infusion |
| PCA | 241716000 | Patient controlled analgesia |
| Subcutaneous hydration (hypodermoclysis) | 113154008 | Subcutaneous clysis of patient for fluid administration |
doseAndRate — prescribed flow rate
The flow rate joins the dose in the same element: rateQuantity (“500 mg/h”) or rateRange (“5 to 10 mL/h”).
timing.repeat — durations, dated phases
duration/durationMax: duration of one administration (“infuse over 15 to 30 min” →duration: 15,durationMax: 30).boundsPeriod: calendar bounds of a phase (“40 mg morning and 20 mg evening until 15/10/2024, then 20 mg morning and evening until 23/10/2024”). Each phase start is derived: the prescription date for the first phase, the day after the previous phase’s end afterwards.boundsDuration: relative treatment length (“for 7 days”, “QSP 28 days”, “OAR 3 months” — prescription-level footers are propagated to every medication without a duration of its own).
dosageInstruction.sequence — phases
A tapering produces several dosageInstructions: the intakes of one phase (“40 mg in the morning and 20 mg in the evening”) share the same sequence; the number increments at each phase (“then…”).
maxDosePerPeriod — dose ceiling
“Maximum 6 tablets/day”, “not exceeding 8 capsules per day” → a Ratio (numerator: the coded ceiling dose, denominator: the period). The ceiling is distinct from the per-intake dose, which is kept alongside.
dispenseRequest.numberOfRepeatsAllowed — renewals
“To be renewed 3 times” → dispenseRequest: { "numberOfRepeatsAllowed": 3 }.
dosageinstruction extensions
Base: https://terminology.posos.co/fhir-extension/dosageinstruction/
| Extension | Value | Source example |
|---|---|---|
ivMode | valueString slow/fast | ”slow direct IV” |
administrationDevice | valueCoding (SNOMED or posos) | “on a pump” → 430033006 Infusion pump |
diluent | valueCoding (linked drug) or valueString | ”in NaCl 0.9%“ |
diluentVolume | valueQuantity (UCUM) | “in 100 mL of NaCl” |
rateMax | valueQuantity | ”maximum rate 10 mL/min” |
continuous | valueBoolean | continuous 24h administration |
Coded administration devices: infusion pump (430033006), PCA pump (462741000), elastomeric diffuser (468746004), syringe driver (465254002), and — in the posos terminology (https://terminology.posos.co/device), as no SNOMED concept exists — the parenteral-nutrition bag (NP_BAG) for additives “to be introduced into the PN bag”.
note — non-structurable instructions
Intake instructions with no dedicated FHIR field are kept verbatim in the MedicationRequest note: “at least 1h before chemotherapy”, “after each liquid stool”, “stop the injections if platelets are < 50,000/mm3”, “by gravity”…
Example
Prescription: “VANCOMYCIN 1 g in 250 mL of NaCl 0.9%, slow IV infusion at 500 mg/h over 2 hours, morning and evening, for 10 days”
dosageInstruction
{
"text": "VANCOMYCIN 1 g in 250 mL of NaCl 0.9%, slow IV infusion at 500 mg/h over 2 hours, morning and evening, for 10 days",
"method": {
"coding": [
{ "system": "http://snomed.info/sct", "code": "14152002", "display": "Intravenous infusion" }
]
},
"doseAndRate": [
{
"doseQuantity": { "value": 1, "unit": "g", "code": "g", "system": "https://ucum.org" },
"rateQuantity": { "value": 500, "unit": "mg/h" }
}
],
"timing": {
"repeat": {
"frequency": 2,
"period": 1,
"periodUnit": "d",
"duration": 2,
"durationUnit": "h",
"when": ["MORN", "EVE"],
"boundsDuration": { "value": 10, "unit": "day", "code": "d" }
}
},
"extension": [
{ "url": "https://terminology.posos.co/fhir-extension/dosageinstruction/ivMode", "valueString": "slow" },
{ "url": "https://terminology.posos.co/fhir-extension/dosageinstruction/diluent", "valueString": "NaCl 0.9%" },
{ "url": "https://terminology.posos.co/fhir-extension/dosageinstruction/diluentVolume", "valueQuantity": { "value": 250, "unit": "mL", "code": "mL", "system": "https://ucum.org" } }
]
}Other guarantees
- Faithful text: each
dosageInstructiontextreproduces the prescription lines as written — never a reconstructed sentence. - Stopped medications: a “Stop X, Y” line never yields a
MedicationRequest. - Standalone solutions: a quantified solution line (“NaCl 0.9% 100 mL bags: 2 bags per day”) is a medication in its own right; an inline solvent (“in 20 mL of NaCl 0.9%”) remains the
diluentof the medication it belongs to. - Dose units coded or absent: a dose unit with no code (UCUM/SNOMED) is not emitted — the value is kept.
Known limits
- Prescribed medical devices (sheaths, catheters, probes) are not returned by the advanced analysis — use
detect_medical_devicewith the standard pipeline if needed. - Stock prescriptions (hospital-pharmacy reserve: “2 ampoules”, “3 vials”) are returned as posologies, not as dispensing quantities.