SFM Basis API Implementation Guide

Task example

Examle of a result (handcoded for now) returning one patient on code=8 (RF/Multidose) having a history of identity change:

{
  "resourceType": "Bundle",
  "id": "bbd2bc68-5e8d-40d7-8467-de875d993a86",
  "meta": {
    "lastUpdated": "2020-03-11T09:51:31.787+02:00"
  },
  "type": "searchset",
  "total": 11,
  "link": [
    {
      "relation": "self",
      "url": "http://api.forskrivning.no/v1/Task?code=8&owner=123456789&_lastUpdated=gt2020-03-01T00:00:00.000+02:00"
    }
  ],
  "entry": [
    {
      "fullUrl": "http://api.forskrivning.no/v1/Task/1029384",
      "resource": {
        "resourceType": "Task",
        "id": "1029384",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2020-03-06T13:31:39.251+02:00",
          "source": "RF",
          "profile": [ 
            "http://ehelse.no/fhir/StructureDefinition/sfm-Task"
          ]
        },
        "contained" : {
                "resourceType": "Patient",
                "id": "999000888333", 
                "meta" : {
                  "profile": [ 
                    "http://ehelse.no/fhir/StructureDefinition/sfm-Patient"
                  ]
                },  
                "identifier": [
                {
                    "use" : "official",
                    "system": "urn:oid:2.16.578.1.12.4.1.4.1",
                    "value": "<fødselsnummer>"
                }, 
                "identifier": [
                {
                    "use" : "old",
                    "system": "urn:oid:2.16.578.1.12.4.1.4.2",
                    "value": "<d-nummer>"
                }
                ]
        }
        "status": "requested",
        "intent": "order",
        "priority": "routine",
        "code": {
            "coding" : {
            "system" : "http://ehelse.no/fhir/CodeSystem/sfm-task-types",
            "code" : "8",
            "display" : "Endring på multidosepasient"
            },
          "text": "Endring på multidosepasient"
        },
        "for": {
          "reference": "#999000888333",
          "display": "<fødselsnummer>"
        },
        "authoredOn": "2020-03-11T09:51:31.787+02:00",
        "lastModified": "2020-03-11T09:51:31.787+02:00",
        "owner" : "<Reference to Practitioner/Id as used in M9.21>"
      }
    },

	: More entries

}