/
Description prescription error

Description prescription error


If the prescription has an error, the original prescription request is completed with the reason why and sent back.

XML example: prescription_request_notification_error.xml

Description:

When sending the message via eHealthBox a functional type is mandatory. For the prescription request, acceptance, denial and error this is PRESCRIPTION_REQUEST.

The error notification to be sent is a kmehr transaction with following specifications. The error notification will be sent automatically if the incoming prescription proposal message validation fails (xsd validation at least)

  • The transaction is a notification transaction
  • A custom transaction type indicating that this is a prescription request.
    • <cd S="LOCAL" SV="1.0" SL="CD-TRANSACTION-TYPE">prescriptionrequest</cd>
    • A custom ID is specified to indicate that this notification is associated with a previous prescription request with the same ID
      • <id S="LOCAL" SV="1.0" SL="ID-PRESCR-REQUEST">f9ec57c7-f3f8-4946-9131-1b2773da43df</id>
      • A custom notification value indicating that the GP has accepted the prescription request.
        • <cd S="LOCAL" SV="1.0" SL="CD-NOTIFICATION-VALUE">ERROR</cd>
        • The author of the notification is the GP
        • A kmehr item containing a description of the error

 

The complete set of rules for the prescription request can be found in the form of xpath queries below

xquery version "1.0";

declare default element namespace "http://www.ehealth.fgov.be/standards/kmehr/schema/v1";

(:Kmehr versions supported: 1.19 (20161201):)
1,boolean(/kmehrmessage/header/standard/cd[@S='CD-STANDARD' and @SV='1.20' and (text()='20161201')]),'&#xa;',

(:2 header IDs must be present: first one with "S" attribute = ID-KMEHR, the second one with "S" attribute = LOCAL:)
2,boolean (count(/kmehrmessage/header/id)>=1),'&#xa;',
3,boolean(/kmehrmessage/header/id[1][@S='ID-KMEHR' and @SV='1.0']),'&#xa;',

(:Sender: At least 2 hcparty's: individual healthcareprovider (or hospital) and "application" (softwareprovider). Name or combination firstname + familyname should always be present:)
5,boolean (count(/kmehrmessage/header/sender/hcparty)>=2),'&#xa;',
6,boolean(/kmehrmessage/header/sender/hcparty[1]/id[@S='ID-HCPARTY' and @SV='1.0']),'&#xa;',
7,boolean(/kmehrmessage/header/sender/hcparty[1]/cd[@S='CD-HCPARTY' and @SV='1.11' and (text()='persphysician')]),'&#xa;',
8,boolean(/kmehrmessage/header/sender/hcparty[2]/cd[@S='CD-HCPARTY' and @SV='1.11' and text()='application']),'&#xa;',
9,boolean (count(/kmehrmessage/header/sender/hcparty[not(name or familyname)])=0),'&#xa;',

(:For sender "application", both telephone and email need to be present, and cannot be empty:)
10,boolean(count(/kmehrmessage/header/sender/hcparty[2]/telecom/cd[@S='CD-ADDRESS' and @SV='1.1']/text())>=2),'&#xa;',
11,boolean(count(/kmehrmessage/header/sender/hcparty[2]/telecom/cd[@S='CD-TELECOM' and @SV='1.0']/text())>=2),'&#xa;',
12,boolean(/kmehrmessage/header/sender/hcparty[2]/telecom/cd[@S='CD-TELECOM' and text()='phone'] and /kmehrmessage/header/sender/hcparty[2]/telecom/cd[@S='CD-TELECOM' and text()='email']),'&#xa;',
13,boolean (count(/kmehrmessage/header/sender/hcparty[2]/telecom/telecomnumber[string-length(text())=0])=0),'&#xa;',

(:Recipient: only 1 hcparty with recipe data:)
14,boolean(count(/kmehrmessage/header/recipient/hcparty)=1),'&#xa;',
15,boolean(/kmehrmessage/header/recipient/hcparty/id[@S='ID-HCPARTY' and @SV='1.0' and string-length(text())>0]),'&#xa;',
16,boolean(/kmehrmessage/header/recipient/hcparty/cd[@S='LOCAL' and @SV='1.0' and @SL='EWZC-HCPARTY' and text()='orgRetirementHome'] or or /kmehrmessage/header/recipient/hcparty/cd[@S='CD-HCPARTY' and @SV='1.11' and (text()='deptpharmacy' or text()='perspharmacist')]),'&#xa;',
17,boolean (count(/kmehrmessage/header/recipient/hcparty[not(name or familyname)])=0),'&#xa;',

(:Folder: exactly 1 folder, with exactly 1 ID, with value "1":)
18,boolean(count(/kmehrmessage/folder)=1),'&#xa;',
19,boolean(count(/kmehrmessage/folder/id)=1),'&#xa;',
20,boolean(/kmehrmessage/folder/id[@S='ID-KMEHR' and @SV='1.0' and text()='1']),'&#xa;',

(:Patient: exactly 1 patient, with exactly 1 ID (= INSZ/NISS number in 11 positions):)
21,boolean(count(/kmehrmessage/folder/patient)=1),'&#xa;',
22,boolean(count(/kmehrmessage/folder/patient/id)=1),'&#xa;',
23,boolean(/kmehrmessage/folder/patient/id[@S='ID-PATIENT' and @SV='1.0' and (string-length(text())=11)]),'&#xa;',

(:Patient: presence of firstname, familyname, sex and birthdate:)
24,boolean(/kmehrmessage/folder/patient/firstname),'&#xa;',
25,boolean(/kmehrmessage/folder/patient/familyname),'&#xa;',
26,boolean(/kmehrmessage/folder/patient/birthdate/date),'&#xa;',
27,boolean(/kmehrmessage/folder/patient/sex/cd[@S='CD-SEX' and @SV='1.1']),'&#xa;',

(:Transaction: Exactly 1 transaction, with 1 ID and 1 CD (CD-TRANSACTION with value pharmaceuticalprescription):)
28,boolean(count(/kmehrmessage/folder/transaction)=1),'&#xa;',
29,boolean(count(/kmehrmessage/folder/transaction/id)>=2),'&#xa;',
30,boolean(/kmehrmessage/folder/transaction/id[1][@S='ID-KMEHR' and @SV='1.0' and text()='1']),'&#xa;',
31,boolean(/kmehrmessage/folder/transaction/id[2][@S='LOCAL' and @SV='1.0' and @SL="ID-PRESCR-REQUEST" and string-length(text())>0]),'&#xa;',
32,boolean(count(/kmehrmessage/folder/transaction/cd)=3),'&#xa;',
33,boolean(/kmehrmessage/folder/transaction/cd[1][@S='CD-TRANSACTION' and @SV='1.10' and text()='notification']),'&#xa;',
34,boolean(/kmehrmessage/folder/transaction/cd[2][@S='LOCAL' and @SV='1.0' and text()='prescriptionrequest']),'&#xa;',
35,boolean(/kmehrmessage/folder/transaction/cd[3][@S='LOCAL' and @SL='CD-NOTIFICATION-VALUE' and @SV='1.0' and (text()='DENIED' or text()='ACCEPTED' or text()='ERROR')]),'&#xa;',

(:Author: Exactly 1 hcparty, with 1 ID (in 11 positions, starting with 1, 3 or 4) and 1 CD-HCPARTY (only allowed prescribers):)
36,boolean(count(/kmehrmessage/folder/transaction/author/hcparty)=1),'&#xa;',
37,boolean(count(/kmehrmessage/folder/transaction/author/hcparty/id)=1),'&#xa;',
38,boolean(/kmehrmessage/folder/transaction/author/hcparty/id[@S='ID-HCPARTY' and @SV='1.0' and string-length(text())=11]),'&#xa;',
39,boolean(count(/kmehrmessage/folder/transaction/author/hcparty/cd)=1),'&#xa;',
40,boolean(/kmehrmessage/folder/transaction/author/hcparty/cd[@S='CD-HCPARTY' and @SV= '1.11' and text() = 'persphysician']),'&#xa;',

(:Author: presence of name or combination firstname + familyname:)
41,boolean (count(/kmehrmessage/folder/transaction/author/hcparty[not(name or familyname)])=0),'&#xa;',

(:Transaction: "iscomplete" and "isvalidated" are both true, no expirationdate should be defined:)
42,boolean(/kmehrmessage/folder/transaction/iscomplete[text()='true']),'&#xa;',
43,boolean(/kmehrmessage/folder/transaction/isvalidated[text()='true']),'&#xa;',
44,boolean(count(/kmehrmessage/folder/transaction/expirationdate)=0),'&#xa;',

(:Transaction: contains exactly 1 heading, and cannot contain any items:)
45,boolean(count(/kmehrmessage/folder/transaction/heading)<=1),'&#xa;',
46,boolean(count(/kmehrmessage/folder/transaction/text)>=0),'&#xa;',
47,boolean(count(/kmehrmessage/folder/transaction/item)=0),'&#xa;'

Related content

Description prescription denied
Description prescription denied
More like this
Description prescription accepted
Description prescription accepted
More like this
Description prescription request
Description prescription request
More like this
Therapylink
Therapylink
More like this
Recip-e for elderly care institutions
Recip-e for elderly care institutions
More like this
Orderlink
More like this