SFM Basis API Implementation Guide

$sendMedication return parameters example

Note that prescriptionOperationResult is used for both new prescription and recall.

{
	"resourceType": "Parameters",
	"parameter": [
		{
			"name": "prescriptionCount",
			"valueString": "2"
		},
		{
			"name": "recallCount",
			"valueString": "1"
		},
		{
			"name": "PllResult",
			"part": [
				{
					"name": "PllmessageID",
					"valueString": "<UUID>"
				},
				{
					"name": "resultCode",
					"valueCoding": {
						"system" : "http://ehelse.no/fhir/CodeSystem/sfm-kj-rf-error-code",
						"code" : "0",
						"display" : "OK"
						
					}
				}
			]
		},
		{
			"name": "prescriptionOperationResult",
			"part": [
				{
					"name": "resetpID",
					"valueString": "<UUID>"
				},
				{
					"name": "refnum",
					"valueString": "<refnum from RF>"
				},
				{
					"name": "resultCode",
					"valueCoding": {
						"system" : "http://ehelse.no/fhir/CodeSystem/sfm-kj-rf-error-code",
						"code" : "0",
						"display" : "OK"
						
					}
				}
			]
		},
		{
			"name": "prescriptionOperationResult",
			"part": [
				{
					"name": "resetpID",
					"valueString": "<Another UUID>"
				},
				{
					"name": "refnum",
					"valueString": "<refnum from RF>"
				},
				{
					"name": "resultCode",
					"valueCoding": {
						"system" : "urn:oid:2.16.578.1.12.4.1.1.7419",
						"code" : "51",
						"display" : "Angitt referansenummer er allerede tatt i bruk tidligere. Resepten avvises."
						
					}
				}
			]
		},
		{
			"name": "prescriptionOperationResult",
			"part": [
				{
					"name": "resetpID",
					"valueString": "<Yet another UUID>"
				},
				{
					"name": "resultCode",
					"valueCoding": {
						"system" : "urn:oid:2.16.578.1.12.4.1.1.7419",
						"code" : "51",
						"display" : "Resepten er allerede tilbakekalt."
						
					}
				}
			]
		}
		
	]
}