Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

If the prescription is denied by the doctor, the original prescription request is completed with the reason why and sent back.

XML example: prescription_request_notification_denied.xml

Description:

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')]),'
',

(: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),'
',
3,boolean(/kmehrmessage/header/id[1][@S='ID-KMEHR' and @SV='1.0']),'
',

(: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),'
',
6,boolean(/kmehrmessage/header/sender/hcparty[1]/id[@S='ID-HCPARTY' and @SV='1.0']),'
',
7,boolean(/kmehrmessage/header/sender/hcparty[1]/cd[@S='CD-HCPARTY' and @SV='1.11' and (text()='persphysician')]),'
',
8,boolean(/kmehrmessage/header/sender/hcparty[2]/cd[@S='CD-HCPARTY' and @SV='1.11' and text()='application']),'
',
9,boolean (count(/kmehrmessage/header/sender/hcparty[not(name or familyname)])=0),'
',

(: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),'
',
11,boolean(count(/kmehrmessage/header/sender/hcparty[2]/telecom/cd[@S='CD-TELECOM' and @SV='1.0']/text())>=2),'
',
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']),'
',
13,boolean (count(/kmehrmessage/header/sender/hcparty[2]/telecom/telecomnumber[string-length(text())=0])=0),'
',

(:Recipient: only 1 hcparty with recipe data:)
14,boolean(count(/kmehrmessage/header/recipient/hcparty)=1),'
',
15,boolean(/kmehrmessage/header/recipient/hcparty/id[@S='ID-HCPARTY' and @SV='1.0' and string-length(text())>0]),'
',
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')]),'
',
17,boolean (count(/kmehrmessage/header/recipient/hcparty[not(name or familyname)])=0),'
',

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

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

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

(:Transaction: Exactly 1 transaction, with 1 ID and 1 CD (CD-TRANSACTION with value pharmaceuticalprescription):)
28,boolean(count(/kmehrmessage/folder/transaction)=1),'
',
29,boolean(count(/kmehrmessage/folder/transaction/id)>=2),'
',
30,boolean(/kmehrmessage/folder/transaction/id[1][@S='ID-KMEHR' and @SV='1.0' and text()='1']),'
',
31,boolean(/kmehrmessage/folder/transaction/id[2][@S='LOCAL' and @SV='1.0' and @SL="ID-PRESCR-REQUEST" and string-length(text())>0]),'
',
32,boolean(count(/kmehrmessage/folder/transaction/cd)=3),'
',
33,boolean(/kmehrmessage/folder/transaction/cd[1][@S='CD-TRANSACTION' and @SV='1.10' and text()='notification']),'
',
34,boolean(/kmehrmessage/folder/transaction/cd[2][@S='LOCAL' and @SV='1.0' and text()='prescriptionrequest']),'
',
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')]),'
',

(: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),'
',
37,boolean(count(/kmehrmessage/folder/transaction/author/hcparty/id)=1),'
',
38,boolean(/kmehrmessage/folder/transaction/author/hcparty/id[@S='ID-HCPARTY' and @SV='1.0' and string-length(text())=11]),'
',
39,boolean(count(/kmehrmessage/folder/transaction/author/hcparty/cd)=1),'
',
40,boolean(/kmehrmessage/folder/transaction/author/hcparty/cd[@S='CD-HCPARTY' and @SV= '1.11' and text() = 'persphysician']),'
',

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

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

(: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;'

  • No labels