{
  "resourceType": "StructureDefinition",
  "id": "kodrx-receta-id",
  "url": "https://kodrx.app/fhir/StructureDefinition/recetaId",
  "version": "1.0.0",
  "name": "KodRxRecetaIdExtension",
  "title": "KodRx Prescription ID Extension",
  "status": "draft",
  "experimental": false,
  "date": "2026-08-16",
  "publisher": "KodRx",

  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>KodRx Prescription ID Extension</p><p>Stores the KodRx prescription identifier associated with a verified prescription.</p></div>"
  },

  "description": "Extension that stores the KodRx prescription identifier associated with a verified prescription.",
  "purpose": "Allows FHIR resources exported by KodRx to reference the originating KodRx prescription identifier.",

  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": false,
  "type": "Extension",

  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",

  "context": [
    {
      "type": "element",
      "expression": "Provenance"
    }
  ],

  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "KodRx prescription identifier",
        "definition": "Identifier of the originating KodRx prescription."
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "https://kodrx.app/fhir/StructureDefinition/recetaId"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      }
    ]
  }
}
