{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/elation-health/main/json-schema/elation-health-med-order-template-schema.json", "title": "MedOrderTemplate", "description": "Contains only webhooks\nAll other fields inherited", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/elation-health-medication-order-templates-api-openapi.yml#/components/schemas/MedOrderTemplate", "properties": { "auth_refills": { "maximum": 99, "minimum": 0, "type": [ "integer", "null" ] }, "deleted_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "directions": { "maxLength": 300, "type": [ "string", "null" ] }, "id": { "readOnly": true, "type": "integer" }, "medication": { "allOf": [ { "$ref": "#/$defs/Medication" } ], "description": "When creating, must contains only one from id, ndcs or rxnorm_cuis fields." }, "practice": { "format": "int64", "type": "integer" }, "qty": { "format": "decimal", "pattern": "^-?\\d{0,18}(?:\\.\\d{0,9})?$", "type": [ "string", "null" ] }, "qty_units": { "oneOf": [ { "$ref": "#/$defs/QtyUnitsEnum" }, { "$ref": "#/$defs/BlankEnum" }, { "$ref": "#/$defs/NullEnum" } ] }, "rank": { "readOnly": true, "type": "integer" }, "specific_ndc": { "type": [ "string", "null" ] } }, "required": [ "medication", "practice" ], "type": "object", "$defs": { "BlankEnum": { "enum": [ "" ] }, "Medication": { "properties": { "active_ndcs": { "items": { "type": "string" }, "type": "array" }, "brand_name": { "readOnly": true, "type": "string" }, "created_date": { "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "creation_type": { "allOf": [ { "$ref": "#/$defs/MedicationDrugType" } ], "default": "user", "readOnly": true }, "form": { "readOnly": true, "type": "string" }, "generic_name": { "readOnly": true, "type": "string" }, "id": { "description": "The id of the medication.", "format": "int64", "type": "integer" }, "is_controlled": { "default": false, "description": "Whether the drug is a controlled substance or not.", "type": "boolean" }, "market_end_date": { "format": "date-time", "type": [ "string", "null" ] }, "name": { "description": "The name that will display for the medication in the search and when referenced by the prescription or documented med.", "type": "string" }, "ndcs": { "description": "The NDCs of the medication (must contain only one ndc code when creating).", "items": { "type": "string" }, "type": "array" }, "obsolete_date": { "description": "The date at which this practice medication became obsolete.", "format": "date-time", "type": [ "string", "null" ] }, "practice": { "description": "The practice that created the medication. `null` for medications from the standard formulary.", "format": "int64", "type": "integer" }, "route": { "readOnly": true, "type": "string" }, "rxnorm_cuis": { "description": "The Rxnorm.cui code of the medication (must contain only one cui code when creating).", "items": { "type": "string" }, "type": "array" }, "strength": { "description": "The strength of the drug, e.g. 40mg.", "maxLength": 255, "type": [ "string", "null" ] }, "type": { "allOf": [ { "$ref": "#/$defs/MedicationType" } ], "default": "prescription", "description": "Whether the practice medication is an OTC or Prescription drug.\n\n* `otc` - otc\n* `prescription` - prescription\n* `discontinued` - discontinued" } }, "type": "object" }, "MedicationDrugType": { "description": "* `user` - user\n* `medispan` - medispan\n* `ss` - surescripts\n* `disp` - dispensary", "enum": [ "user", "medispan", "ss", "disp" ], "type": "string" }, "MedicationType": { "description": "* `otc` - otc\n* `prescription` - prescription\n* `discontinued` - discontinued", "enum": [ "otc", "prescription", "discontinued" ], "type": "string" }, "NullEnum": { "type": "null" }, "QtyUnitsEnum": { "description": "* `BAG` - BAG\n* `BOTTLE` - BOTTLE\n* `BOX` - BOX\n* `CAPSULE` - CAPSULE\n* `CARTRIDGE` - CARTRIDGE\n* `CONTAINER` - CONTAINER\n* `DROP` - DROP\n* `GRAM` - GRAM\n* `INHALER` - INHALER\n* `INTERNATIONAL UNITE` - INTERNATIONAL UNITE\n* `KIT` - KIT\n* `LITER` - LITER\n* `LOZENGE` - LOZENGE\n* `MILLIGRAM` - MILLIGRAM\n* `MILLILITER` - MILLILITER\n* `MILLION UNITS` - MILLION UNITS\n* `MUTUALLY DEFINED` - MUTUALLY DEFINED\n* `FLUID OUNCE` - FLUID OUNCE\n* `NOT SPECIFIED` - NOT SPECIFIED\n* `PACK` - PACK\n* `PACKET` - PACKET\n* `PINT` - PINT\n* `SUPPOSITORY` - SUPPOSITORY\n* `SYRINGE` - SYRINGE\n* `TABLESPOON` - TABLESPOON\n* `TABLET` - TABLET\n* `TEASPOON` - TEASPOON\n* `TRANSDERMAL PATCH` - TRANSDERMAL PATCH\n* `TUBE` - TUBE\n* `UNIT` - UNIT\n* `VIAL` - VIAL\n* `EACH` - EACH\n* `GUM` - GUM\n* `AMPULE` - AMPULE\n* `APPLICATOR` - APPLICATOR\n* `APPLICATORFUL` - APPLICATORFUL\n* `BAR` - BAR\n* `BEAD` - BEAD\n* `BLISTER` - BLISTER\n* `BLOCK` - BLOCK\n* `BOLUS` - BOLUS\n* `CAN` - CAN\n* `CANISTER` - CANISTER\n* `CAPLET` - CAPLET\n* `CARTON` - CARTON\n* `CASE` - CASE\n* `CASSETTE` - CASSETTE\n* `CYLINDER` - CYLINDER\n* `DISK` - DISK\n* `DOSE PACK` - DOSE PACK\n* `DUAL PACK` - DUAL PACK\n* `FILM` - FILM\n* `GALLON` - GALLON\n* `IMPLANT` - IMPLANT\n* `INHALATION` - INHALATION\n* `INHALER REFILL` - INHALER REFILL\n* `INSERT` - INSERT\n* `INTRAVENOUS BAG` - INTRAVENOUS BAG\n* `KILOGRAM` - KILOGRAM\n* `METRIC DROP` - METRIC DROP\n* `MILLIMETER` - MILLIMETER\n* `NEBULE` - NEBULE\n* `NEEDLE FREE INJECTION` - NEEDLE FREE INJECTION\n* `OCULAR SYSTEM` - OCULAR SYSTEM\n* `OUNCE` - OUNCE\n* `PACKAGE` - PACKAGE\n* `PAD` - PAD\n* `PAPER` - PAPER\n* `PATCH` - PATCH\n* `PEN NEEDLE` - PEN NEEDLE\n* `POUCH` - POUCH\n* `POUND` - POUND\n* `PRE-FILLED PEN SYRINGE` - PRE-FILLED PEN SYRINGE\n* `PUFF` - PUFF\n* `QUART` - QUART\n* `RING` - RING\n* `SACHET` - SACHET\n* `SCOOPFUL` - SCOOPFUL\n* `SPONGE` - SPONGE\n* `SPRAY` - SPRAY\n* `STICK` - STICK\n* `STRIP` - STRIP\n* `SWAB` - SWAB\n* `TABMINDER` - TABMINDER\n* `TAMPON` - TAMPON\n* `TRAY` - TRAY\n* `TROCHE` - TROCHE\n* `` - \n* `WAFER` - WAFER", "enum": [ "BAG", "BOTTLE", "BOX", "CAPSULE", "CARTRIDGE", "CONTAINER", "DROP", "GRAM", "INHALER", "INTERNATIONAL UNITE", "KIT", "LITER", "LOZENGE", "MILLIGRAM", "MILLILITER", "MILLION UNITS", "MUTUALLY DEFINED", "FLUID OUNCE", "NOT SPECIFIED", "PACK", "PACKET", "PINT", "SUPPOSITORY", "SYRINGE", "TABLESPOON", "TABLET", "TEASPOON", "TRANSDERMAL PATCH", "TUBE", "UNIT", "VIAL", "EACH", "GUM", "AMPULE", "APPLICATOR", "APPLICATORFUL", "BAR", "BEAD", "BLISTER", "BLOCK", "BOLUS", "CAN", "CANISTER", "CAPLET", "CARTON", "CASE", "CASSETTE", "CYLINDER", "DISK", "DOSE PACK", "DUAL PACK", "FILM", "GALLON", "IMPLANT", "INHALATION", "INHALER REFILL", "INSERT", "INTRAVENOUS BAG", "KILOGRAM", "METRIC DROP", "MILLIMETER", "NEBULE", "NEEDLE FREE INJECTION", "OCULAR SYSTEM", "OUNCE", "PACKAGE", "PAD", "PAPER", "PATCH", "PEN NEEDLE", "POUCH", "POUND", "PRE-FILLED PEN SYRINGE", "PUFF", "QUART", "RING", "SACHET", "SCOOPFUL", "SPONGE", "SPRAY", "STICK", "STRIP", "SWAB", "TABMINDER", "TAMPON", "TRAY", "TROCHE", "WAFER" ], "type": "string" } } }