{
  "resourceType": "OperationDefinition",
  "url": "http://electronichealth.se/fhir/OperationDefinition/NLLRestore",
  "version": "1.0.0",
  "name": "NLLRestore",
  "status": "active",
  "kind": "operation",
  "date": "2024-03-22",
  "publisher": "The Swedish eHealth Agency",
  "description": "Restores one or two (if parallell) prescriptions to their previous versions.",
  "affectsState": true,
  "code": "restore",
  "comment": "Can be invoked with a HTTP POST.\r\nThis operation is used for restoring one or two (if parallell) MedicationRequests to their previous versions.",
  "resource": [
    "MedicationRequest"
  ],
  "system": false,
  "type": true,
  "instance": false,
  "parameter": [
    {
      "name": "resource",
      "use": "in",
      "min": 1,
      "max": "2",
      "documentation": "Reference to the MedicationRequest(s) that should be restored to previous versions. Shall contain version specific reference to the resource version that will be restored on the following format: MedicationRequest/[id]/_history/[vid].",
      "type": "Reference",
      "targetProfile": [
        "http://electronichealth.se/fhir/StructureDefinition/NLLReference"
      ]
    },
    {
      "name": "result",
      "use": "out",
      "min": 1,
      "max": "2",
      "documentation": "The restored MedicationRequests.",
      "type": "MedicationRequest"
    }
  ]
}