{
  "resourceType" : "OperationDefinition",
  "id" : "MedicationListFi-get-old-prescriptions",
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition MedicationListFi-get-old-prescriptions</b></p><a name=\"MedicationListFi-get-old-prescriptions\"> </a><a name=\"hcMedicationListFi-get-old-prescriptions\"> </a><p>URL: [base]/$MedicationListFi-get-old-prescriptions</p><h3>Parameters</h3><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>requestPurpose</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Purpose of requesting medication information. Expressed using a code from the Kanta code system 'urn:oid:1.2.246.537.5.40110.2006' (Sähköinen lääkemääräys - Reseptikyselyn syy). Provide both the system and the code.</p>\n</div></td></tr><tr><td>IN</td><td>serviceEventId</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>Identifier of a service event, if request is done from a open service event.</p>\n</div></td></tr><tr><td>IN</td><td>patientIdentifier</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Identifier\">Identifier</a></td><td/><td><div><p>Identifier of the patient. Provide both the system 'urn:oid:1.2.246.21' and the identifier.</p>\n</div></td></tr><tr><td>IN</td><td>authoredOn</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Period\">Period</a></td><td/><td><div><p>Time period for which medication history is requested. The length of the time period can be at most 36 months, but the period can be at any point in the patient's medication history. An exception to this are pharmacies and hospital pharmacies, for which the search is limited to 42 months prior to the current time point. The accepted date format is YYYY-MM-DD.</p>\n</div></td></tr><tr><td>IN</td><td>latestDispenseOnly</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#boolean\">boolean</a></td><td/><td><div><p>Return only the latest dispense of a prescription (true) or all dispenses (false). In both cases, only the most recent version of the dispense is returned.</p>\n</div></td></tr><tr><td>IN</td><td>category</td><td/><td>0..*</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Category of the prescription. The parameter is <strong>required for pharmacies and hospital pharmacies</strong> and optional for patient information systems. The category is expressed using a code from the Kanta code system 'urn:oid:1.2.246.537.6.605.2014' (THL - Reseptin laji). Provide both the system and the code.</p>\n</div></td></tr><tr><td>IN</td><td>x-extent</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Return only up-to-date versions (code: &quot;1&quot;) or all versions (code: &quot;2&quot;). The corresponding Kanta code system 'urn:oid:1.2.246.537.5.40160.2008' (KanTa-palvelut - Palautettavien tietojen kattavuus) has to be specified. If the parameter is not provided, the most recent versions of the prescriptions are returned.</p>\n</div></td></tr><tr><td>IN</td><td>dispenseStatus</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/datatypes.html#Coding\">Coding</a></td><td/><td><div><p>Return only non-dispensed or partially dispensed prescriptions (code: &quot;1&quot;) or fully dispensed prescriptions (code: &quot;2&quot;). If the parameter is not provided, prescriptions are returned regardless of their dispensing status. The corresponding Kanta code system 'urn:oid:1.2.246.537.5.40121.2006' has to be specified.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/bundle.html\">Bundle</a></td><td/><td><div><p>Kanta medication list</p>\n</div></td></tr></table></div>"
  },
  "url" : "https://eradocumentation.atostek.com/OperationDefinition/MedicationListFi-get-old-prescriptions",
  "version" : "1.0.0",
  "name" : "MedicationListFi-Get-Old-Prescriptions",
  "title" : "MedicationListFI Get Old Prescriptions",
  "status" : "draft",
  "kind" : "operation",
  "date" : "2026-10-28T11:52:12+00:00",
  "publisher" : "Atostek",
  "contact" : [{
    "name" : "Atostek",
    "telecom" : [{
      "system" : "url",
      "value" : "https://atostek.com/"
    }]
  }],
  "description" : "The operation makes a request to the Kanta Prescription Centre and retrieves a list of all prescriptions without identifiers of the medication being currently in use (= prescriptions created before the Kanta medication list specification). Information about renewal requests, blocks, reservations, and dispenses is also returned.\n\nThe operation requires an active ERA session and the client registry ID. Please provide these in the request header.\n\nThe search result is stored in the client's registry in ERA's database and returned to the client. If the search is performed successfully but returns no results, an empty Bundle is returned. The search results can be limited if the patient has restricted the sharing of their personal health information.",
  "code" : "MedicationListFi-get-old-prescriptions",
  "system" : true,
  "type" : false,
  "instance" : false,
  "parameter" : [{
    "name" : "requestPurpose",
    "use" : "in",
    "min" : 1,
    "max" : "1",
    "documentation" : "Purpose of requesting medication information. Expressed using a code from the Kanta code system 'urn:oid:1.2.246.537.5.40110.2006' (Sähköinen lääkemääräys - Reseptikyselyn syy). Provide both the system and the code.",
    "type" : "Coding"
  },
  {
    "name" : "serviceEventId",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Identifier of a service event, if request is done from a open service event.",
    "type" : "Identifier"
  },
  {
    "name" : "patientIdentifier",
    "use" : "in",
    "min" : 1,
    "max" : "1",
    "documentation" : "Identifier of the patient. Provide both the system 'urn:oid:1.2.246.21' and the identifier.",
    "type" : "Identifier"
  },
  {
    "name" : "authoredOn",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Time period for which medication history is requested. The length of the time period can be at most 36 months, but the period can be at any point in the patient's medication history. An exception to this are pharmacies and hospital pharmacies, for which the search is limited to 42 months prior to the current time point. The accepted date format is YYYY-MM-DD.",
    "type" : "Period"
  },
  {
    "name" : "latestDispenseOnly",
    "use" : "in",
    "min" : 1,
    "max" : "1",
    "documentation" : "Return only the latest dispense of a prescription (true) or all dispenses (false). In both cases, only the most recent version of the dispense is returned.",
    "type" : "boolean"
  },
  {
    "name" : "category",
    "use" : "in",
    "min" : 0,
    "max" : "*",
    "documentation" : "Category of the prescription. The parameter is **required for pharmacies and hospital pharmacies** and optional for patient information systems. The category is expressed using a code from the Kanta code system 'urn:oid:1.2.246.537.6.605.2014' (THL - Reseptin laji). Provide both the system and the code.",
    "type" : "Coding"
  },
  {
    "name" : "x-extent",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Return only up-to-date versions (code: \"1\") or all versions (code: \"2\"). The corresponding Kanta code system 'urn:oid:1.2.246.537.5.40160.2008' (KanTa-palvelut - Palautettavien tietojen kattavuus) has to be specified. If the parameter is not provided, the most recent versions of the prescriptions are returned.",
    "type" : "Coding"
  },
  {
    "name" : "dispenseStatus",
    "use" : "in",
    "min" : 0,
    "max" : "1",
    "documentation" : "Return only non-dispensed or partially dispensed prescriptions (code: \"1\") or fully dispensed prescriptions (code: \"2\"). If the parameter is not provided, prescriptions are returned regardless of their dispensing status. The corresponding Kanta code system 'urn:oid:1.2.246.537.5.40121.2006' has to be specified.",
    "type" : "Coding"
  },
  {
    "name" : "return",
    "use" : "out",
    "min" : 1,
    "max" : "1",
    "documentation" : "Kanta medication list",
    "type" : "Bundle"
  }]
}