Did this mail reach the group ?
*********** Hi Raul and All, Thanks for replying Here are the files... CreateRx.xml is the input xml document to be signed xslt.xslt is the XSLT Transform file to be applied sign.xml is the signed document containing the appended XML DSig Structure. If I use the same XMLSignature object which has been used for signing to verify, I have been able to verify successfully. Looking forward to your help Thanks Ritesh -----Original Message----- From: Raul Benito [mailto:[EMAIL PROTECTED] Sent: 01 March 2005 19:13 To: security-dev@xml.apache.org Subject: Re: Help - DSIG Verification Can you post your xml files, the two inputs and the outputs. Regards. On Tue, 1 Mar 2005 12:54:29 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello Raul and everyone else, > > Thanks for the pointer, but is there something specific that you can see > which I m doing blatantly wrong, because I've stuck to the DSig sample and > coded, so wonder why I can't verify the signature, when I m using the correct > keys. > > One doubt, when I m not signing files, how does the Signature Verifier know > where it has to resolve the document which it signed reference to? Also, the > verifier XMLSignature constructor, doesn't take any input algorithm. Is that > why I am not able to verify ? > > Looking from pointers at u guys... > Thanks, > Ritesh > > > -----Original Message----- > From: Raul Benito [mailto:[EMAIL PROTECTED] > Sent: 01 March 2005 08:36 > To: security-dev@xml.apache.org > Subject: Re: Help - DSIG Verification > > I haven't look in enought detail on this, so I´m only going to answer > the theoricall things. > > On Fri, 25 Feb 2005 12:08:56 -0000, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > > > > > > > People, > > > > > > > > I've managed to create a DSIG with a XSLT Transform and exclusive > > canonicalization. > > > > If someone can answer a few queries for me : > > > > > > > > 1) With the code I've written below, can I be sure that the API > > internally applies canonicalization and the XSLT Transform, before > > calculating the Hash and finally the Signature Value ? > Yes, the code always c14n everything that is going to be sign. > > > > 2) When I invoke the verification call, it fails with the following > > result : > > > > > > > > Gunna Sign > > > > Completed Signing > > > > Gunna Decode > > > > 25-Feb-2005 11:49:20 org.apache.xml.security.signature.Reference verify> > > > INFO: Verification successful for URI "" > > > > Verification Result : false > > > > Completed Decoding > > > > > It means that the hash is correct, but the signature not. > > > > Why is this verification failing ? When I m passing the correct public > key... > > and what does the log generated by the API signify ? > > > > Someone please help ! I have a deadline to meet... > > > > > Sorry for not helping before. > > > > > > > > public class SampleTransformXSLT { > > > > > > > > /**+ > > > > * Method main > > > > * > > > > * @param args > > > > * @throws Exception > > > > */ > > > > public static void main(String args[]) throws Exception { > > > > org.apache.xml.security.Init.init(); > > > > > > > > //J- > > > > String transformStr = convertFileToString(new > > File("D:/eclipse/workspace/XMLDSig/dataFiles/xslt.xslt")) ; > > > > > > > > String inputStr =convertFileToString(new > > File("D:/eclipse/workspace/XMLDSig/dataFiles/CreateRx.xml")) ; > > > > //J+ > > > > javax.xml.parsers.DocumentBuilderFactory dbf = > > > > javax.xml.parsers.DocumentBuilderFactory.newInstance(); > > > > > > > > dbf.setNamespaceAware(true); > > > > > > > > javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();> > > > org.w3c.dom.Document doc = > > > > db.parse(new > > java.io.ByteArrayInputStream(transformStr.getBytes())); > > > > > > > > > > > > KeyPairGenerator pairGenerator = KeyPairGenerator.getInstance("RSA"); > > > > > KeyPair keyPair = pairGenerator.generateKeyPair(); > > > > Document sourceDoc = db.parse(new > > java.io.ByteArrayInputStream(inputStr.getBytes())); > > > > Document transformDoc = db.parse(new > > java.io.ByteArrayInputStream(transformStr.getBytes())); > > > > > > > > XMLSignature signer = new > > XMLSignature(sourceDoc,null,XMLSignature.ALGO_ID_SIGNATURE_RSA); > > > > > > > > sourceDoc.getDocumentElement().appendChild(signer.getElement()); > > > > > > > > Transforms transforms = new Transforms(sourceDoc); > > > > > > > > transforms.addTransform(Transforms.TRANSFORM_ENVELOPED_SIGNATURE);> > > > > > > > > transforms.addTransform(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS); > > > > > > > > Node xslElem = transformDoc.getDocumentElement(); > > > > Node xslElemImported = sourceDoc.importNode(xslElem, true); > > > > > > > > transforms.addTransform(Transforms.TRANSFORM_XSLT, > > (org.w3c.dom.Element)xslElemImported); > > > > > > > > signer.addDocument("",transforms,Constants.ALGO_ID_DIGEST_SHA1); > > > > > > > > signer.addKeyInfo(keyPair.getPublic()); > > > > > > > > System.out.println("Gunna Sign"); > > > > signer.sign(keyPair.getPrivate()); > > > > System.out.println("Completed Signing"); > > > > > > > > XMLUtils.outputDOM(signer.getDocument(),new FileOutputStream(new > > File("D:/eclipse/workspace/XMLDSig/dataFiles/sign.xml"))); > > > > > > > > > > > > //call to verify > > > > verify(keyPair.getPublic()); > > > > > > > > } > > > > > > > > > > > > > > > > private static String convertFileToString(File file) > > > > { > > > > StringBuffer buffer = new StringBuffer(); > > > > try > > > > { > > > > String line = null; > > > > FileInputStream fin = new FileInputStream(file); > > > > BufferedReader reader = > > > > new BufferedReader(new InputStreamReader(fin));> > > > while ((line = reader.readLine()) != null) > > > > { > > > > buffer.append(line); > > > > } > > > > } > > > > catch (Exception exc) > > > > { > > > > exc.printStackTrace(); > > > > } > > > > return buffer.toString(); > > > > } > > > > > > > > static > > > > { > > > > Init.init(); > > > > } > > > > > > > > } > > > > > > > > public static void verify(PublicKey publicKey) throws Exception { > > > > > > > > > > > > //J- > > > > String inputStr = convertFileToString(new > > File("D:/eclipse/workspace/XMLDSig/dataFiles/sign.xml")) ; > > > > > > > > javax.xml.parsers.DocumentBuilderFactory dbf = > > > > javax.xml.parsers.DocumentBuilderFactory.newInstance(); > > > > > > > > dbf.setNamespaceAware(true); > > > > > > > > javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();> > > > > > > > Document sourceDoc = db.parse(new > > java.io.ByteArrayInputStream(inputStr.getBytes())); > > > > > > > > Element dsigElement = > > (Element)sourceDoc.getDocumentElement().getLastChild(); > > > > > > > > System.out.println(dsigElement.getNodeName()); > > > > > > > > XMLSignature signer = new XMLSignature(dsigElement,null); > > > > > > > > System.out.println("Gunna Decode"); > > > > System.out.println(signer.checkSignatureValue(publicKey)); > > > > System.out.println("Completed Decoding"); > > > > > > > > } > > > > ******************************************************************** > > This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person > Thank you > > Check us out at http://www.bt.com/consulting > > ******************************************************************** > > -- http://r-bg.com ******************************************************************** This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you Check us out at http://www.bt.com/consulting ********************************************************************
xslt.xslt
Description: xslt.xslt
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Syntegra (Syntegra) --> <ParentPrescription xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <id root="24930966-D6F8-AEA0-3887-87260944FF67"/> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.15" code="163501000000109"/> <effectiveTime value="20040808111111"/> <recordTarget typeCode="RCT"> <Patient classCode="PAT"> <id root="2.16.840.1.113883.2.1.4.1" extension="NHSID0001000200030005"/> <addr use="H"> <streetAddressLine>1, The High Street</streetAddressLine> <city>Simple Town</city> <postalCode>AA1 1AA</postalCode> </addr> <patientPerson classCode="PSN" determinerCode="INSTANCE"> <name> <given>John</given> <family>Smith</family> </name> <administrativeGenderCode code="1" codeSystem="2.16.840.1.113883.2.1.3.2.4.16.25"/> <birthTime value="19120412"/> </patientPerson> <sourceOf typeCode="registeredWith"> <GpRegisteredWith classCode="ROL"> <!--ID of registered GP--> <id root="2.16.840.1.113883.2.1.3.2.4.11" extension="984181387037"/> </GpRegisteredWith> </sourceOf> </Patient> </recordTarget> <pertinentInformation1 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.pertinentInformation"/> <pertinentPrescription classCode="SBADM" moodCode="RQO"> <id root="B3630BBD-3D80-5F5E-FA0B-A63700165B32"> <!--Prescription ID --> </id> <id root="2.16.840.1.113883.2.1.3.2.4.18.4" extension="B3630BBD-3D80-5F5E-FA0B-A63700165B322"> <!--Prescription ID plus check digit--> </id> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.15" code="16076005"/> <repeatNumber> <low value="0"/> <high value="1"/> </repeatNumber> <performer typeCode="PRF" contextControlCode="OP"> <AgentOrgSDS classCode="AGNT"> <id root="2.16.840.1.113883.2.1.4.1" extension="00.00"/> <agentOrganizationSDS> <id root="2.16.840.1.113883.2.1.4.1" extension="Disp0001000200030005"/> </agentOrganizationSDS> </AgentOrgSDS> </performer> <author typeCode="AUT" contextControlCode="OP"> <time value="20030808111111"/> <signatureText/> <AgentPerson classCode="AGNT"> <id root="2.16.840.1.113883.2.1.3.2.4.11" extension="123456"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01132345678"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id root="1.2.826.0.1285.0.2.0.65" extension="PR0001000200030005"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <id extension="PRORG0001000200030005" root="2.16.840.1.113883.2.1.4.3"> <!--Surgery ID--> </id> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"> <!--General Medical Practice--> </code> <name>Treetops Surgery</name> </representedOrganization> </AgentPerson> </author> <legalAuthenticator typeCode="LA" contextControlCode="OP"> <time value="20040808111111"/> <signatureText/> <AgentPerson classCode="AGNT"> <id root="2.16.840.1.113883.2.1.4.3" extension="254555686564"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01392 999999"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id root="1.2.826.0.1285.0.2.0.65" extension="123456"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <!--code for General Medical Practice--> <id root="2.16.840.1.113883.2.1.4.3" extension="PRAuth0001000200030005"/> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"/> <name>Mirfield Surgery</name> </representedOrganization> </AgentPerson> </legalAuthenticator> <responsibleParty typeCode="RESP" contextControlCode="OP"> <AgentPerson classCode="AGNT"> <id root="2.16.840.1.113883.2.1.4.3" extension="1457582556"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01132345678"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id root="1.2.826.0.1285.0.2.0.65" extension="RESP0001000200030005"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <!--code for General Medical Practice--> <id root="2.16.840.1.113883.2.1.4.3" extension="PRAuth0001000200030005"/> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"/> <name>Mirfield Surgery</name> </representedOrganization> </AgentPerson> </responsibleParty> <pertinentInformation11 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <pertinentReviewDate classCode="OBS" moodCode="EVN"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="RD"/> <effectiveTime value="20041010000000"/> </pertinentReviewDate> </pertinentInformation11> <pertinentInformation5 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <pertinentPrescriptionTreatmentType classCode="OBS" moodCode="EVN"> <!--Treatment Type is "Acute"--> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="PTT"/> <value codeSystem="2.16.840.1.113883.2.1.3.2.4.16.36" code="0002"/> </pertinentPrescriptionTreatmentType> </pertinentInformation5> <pertinentInformation6 typeCode="PERT" inversionInd="false" contextConductionInd="false" negationInd="false"> <seperatableInd value="true"/> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.sourceOf1"/> <pertinentCareEventRef classCode="ACT" moodCode="EVN"> <!--This is a care event (encounter) ID. This is a fixed value for etp testing as ETP doesnt care for this ID.--> <id root="04B377BE-ED56-7AD4-A02A-438A76C42262"/> </pertinentCareEventRef> </pertinentInformation6> <pertinentInformation7 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <pertinentDaysSupply classCode="SPLY" moodCode="RQO"> <effectiveTime> <low value="20040604"/> <high value="20041204"/> </effectiveTime> <!--The number of days? treatment that the medications in this prescription are intended to be provide for. This is a fixed value for etp testing as ETP doesnt care what these dates are.--> <expectedUseTime> <low value="20040112000000"/> <high value="20051212000000"/> </expectedUseTime> </pertinentDaysSupply> </pertinentInformation7> <pertinentInformation1 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <pertinentDispensingSitePreference classCode="OBS" moodCode="EVN"> <!--Preference is "None"--> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="DISP"/> <value codeSystem="2.16.840.1.113883.2.1.3.2.4.17.21" code="0001"/> </pertinentDispensingSitePreference> </pertinentInformation1> <pertinentInformation2 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.sourceOf2"/> <pertinentLineItem classCode="SBADM" moodCode="RQO"> <id root="1EE942DF-D593-8D4E-0160-52B9D0CC6F46"/> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.15" code="18629005"> <!--Medication Administration--> </code> <!--Effective Date, Dose Quantity & Rate Quantity are fixed for eTP testing as there are no business rules for ETP.--> <effectiveTime value="20040101"/> <repeatNumber> <low value="0"/> <high value="1"/> </repeatNumber> <doseQuantity> <center unit="tablet" value="1"/> </doseQuantity> <rateQuantity> <low value="1" unit="1"/> <width value="1" unit="1"/> </rateQuantity> <product typeCode="PRD" contextControlCode="OP"> <manufacturedProduct classCode="MANU"> <manufacturedRequestedMaterial classCode="MMAT" determinerCode="KIND"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.15" code="12345" displayName="Paracetamol"> <!--Code is fixed for ETP Testing. The name can be changed using the Generator Tool.--> </code> </manufacturedRequestedMaterial> </manufacturedProduct> </product> <pertinentInformation1 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="false"/> <pertinentAdditionalInstructions classCode="OBS" moodCode="EVN"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="AI"/> <value>Apply sparingly twice a day</value> </pertinentAdditionalInstructions> </pertinentInformation1> <!--Pertinent Information 2 & 3 are fixed in the template as etp sub-system does not process these nodes. For testing manually change these nodes.--> <pertinentInformation2 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="false"/> <pertinentLineItemQuantity classCode="SPLY" moodCode="RQO"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.15" code="246205007"> <!--Supply--> </code> <quantity unit="grams" value="50"/> </pertinentLineItemQuantity> </pertinentInformation2> <pertinentInformation3 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="false"/> <pertinentPrescriberEndorsement classCode="OBS" moodCode="EVN"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="PE"/> <text>Prescriber endorsement text</text> <value codeSystem="2.16.840.1.113883.2.1.3.2.4.16.32" code="CC"/> </pertinentPrescriberEndorsement> </pertinentInformation3> <pertinentInformation4 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="false"/> <pertinentDosageInstructions classCode="OBS" moodCode="EVN"> <code codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30" code="DI"/> <value>One tablet two times a day daily</value> </pertinentDosageInstructions> </pertinentInformation4> <inFulfillmentOf typeCode="FLFS" inversionInd="false" contextConductionInd="false" negationInd="false"> <seperatableInd value="false"/> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.sourceOf1"/> <priorOriginalItemRef classCode="SBADM" moodCode="RQO"> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </priorOriginalItemRef> </inFulfillmentOf> </pertinentLineItem> </pertinentInformation2> <pertinentInformation4 typeCode="PERT" inversionInd="false" contextConductionInd="true" negationInd="false"> <seperatableInd value="true"/> <pertinentPrescriptionType> <code code="2.16.840.1.113883.2.1.3.2.4.17.30" codeSystem="PT"/> <value code="0001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.25"/> </pertinentPrescriptionType> </pertinentInformation4> <inFulfillmentOf typeCode="FLFS" inversionInd="false" contextConductionInd="false" negationInd="false"> <seperatableInd value="true"/> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.sourceOf1"/> <priorOriginalPrescriptionRef classCode="SBADM" moodCode="RQO"> <!--ID fixed for ETP testing. This represents the Original Prescription in case of Repeat prescriptions. Remove manually if not required.--> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </priorOriginalPrescriptionRef> </inFulfillmentOf> </pertinentPrescription> </pertinentInformation1> <pertinentInformation2 typeCode="PERT"> <templateId root="2.16.840.1.113883.2.1.3.2.4.18.2" extension="CSAB_RM-NPfITUK10.pertinentInformation1"/> <pertinentCareRecordElementCategory classCode="CATEGORY" moodCode="EVN"> <code code="16076005" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"/> <component typeCode="COMP"> <actRef classCode="SBADM" moodCode="RQO"> <!-- Prescription ID --> <id root="6E03AD7E-EA82-9B85-EDA6-CE07280C74D3"/> </actRef> </component> <component typeCode="COMP"> <actRef classCode="SBADM" moodCode="RQO"> <!-- Line Item ID --> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </actRef> </component> </pertinentCareRecordElementCategory> </pertinentInformation2> </ParentPrescription>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Syntegra (Syntegra) --><ParentPrescription xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <id root="24930966-D6F8-AEA0-3887-87260944FF67"/> <code code="163501000000109" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"/> <effectiveTime value="20040808111111"/> <recordTarget typeCode="RCT"> <Patient classCode="PAT"> <id extension="NHSID0001000200030005" root="2.16.840.1.113883.2.1.4.1"/> <addr use="H"> <streetAddressLine>1, The High Street</streetAddressLine> <city>Simple Town</city> <postalCode>AA1 1AA</postalCode> </addr> <patientPerson classCode="PSN" determinerCode="INSTANCE"> <name> <given>John</given> <family>Smith</family> </name> <administrativeGenderCode code="1" codeSystem="2.16.840.1.113883.2.1.3.2.4.16.25"/> <birthTime value="19120412"/> </patientPerson> <sourceOf typeCode="registeredWith"> <GpRegisteredWith classCode="ROL"> <!--ID of registered GP--> <id extension="984181387037" root="2.16.840.1.113883.2.1.3.2.4.11"/> </GpRegisteredWith> </sourceOf> </Patient> </recordTarget> <pertinentInformation1 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <templateId extension="CSAB_RM-NPfITUK10.pertinentInformation" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <pertinentPrescription classCode="SBADM" moodCode="RQO"> <id root="B3630BBD-3D80-5F5E-FA0B-A63700165B32"> <!--Prescription ID --> </id> <id extension="B3630BBD-3D80-5F5E-FA0B-A63700165B322" root="2.16.840.1.113883.2.1.3.2.4.18.4"> <!--Prescription ID plus check digit--> </id> <code code="16076005" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"/> <repeatNumber> <low value="0"/> <high value="1"/> </repeatNumber> <performer contextControlCode="OP" typeCode="PRF"> <AgentOrgSDS classCode="AGNT"> <id extension="00.00" root="2.16.840.1.113883.2.1.4.1"/> <agentOrganizationSDS> <id extension="Disp0001000200030005" root="2.16.840.1.113883.2.1.4.1"/> </agentOrganizationSDS> </AgentOrgSDS> </performer> <author contextControlCode="OP" typeCode="AUT"> <time value="20030808111111"/> <signatureText/> <AgentPerson classCode="AGNT"> <id extension="123456" root="2.16.840.1.113883.2.1.3.2.4.11"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01132345678"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id extension="PR0001000200030005" root="1.2.826.0.1285.0.2.0.65"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <id extension="PRORG0001000200030005" root="2.16.840.1.113883.2.1.4.3"> <!--Surgery ID--> </id> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"> <!--General Medical Practice--> </code> <name>Treetops Surgery</name> </representedOrganization> </AgentPerson> </author> <legalAuthenticator contextControlCode="OP" typeCode="LA"> <time value="20040808111111"/> <signatureText/> <AgentPerson classCode="AGNT"> <id extension="254555686564" root="2.16.840.1.113883.2.1.4.3"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01392 999999"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id extension="123456" root="1.2.826.0.1285.0.2.0.65"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <!--code for General Medical Practice--> <id extension="PRAuth0001000200030005" root="2.16.840.1.113883.2.1.4.3"/> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"/> <name>Mirfield Surgery</name> </representedOrganization> </AgentPerson> </legalAuthenticator> <responsibleParty contextControlCode="OP" typeCode="RESP"> <AgentPerson classCode="AGNT"> <id extension="1457582556" root="2.16.840.1.113883.2.1.4.3"/> <code code="2.16.840.1.113883.2.1.3.2.4.17.24" codeSystem="001"/> <addr use="WP"> <streetAddressLine>Scholar's Gate</streetAddressLine> <streetAddressLine>Lea Village</streetAddressLine> <city>Birmingham</city> <postalCode>B33 0DL</postalCode> </addr> <telecom use="WP" value="01132345678"/> <agentPerson classCode="PSN" determinerCode="INSTANCE"> <id extension="RESP0001000200030005" root="1.2.826.0.1285.0.2.0.65"/> <name> <prefix>Dr</prefix> <given>Irate</given> <given>Ande</given> <family>Cantankerous</family> </name> </agentPerson> <representedOrganization classCode="ORG" determinerCode="INSTANCE"> <!--code for General Medical Practice--> <id extension="PRAuth0001000200030005" root="2.16.840.1.113883.2.1.4.3"/> <code code="001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.94"/> <name>Mirfield Surgery</name> </representedOrganization> </AgentPerson> </responsibleParty> <pertinentInformation11 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <pertinentReviewDate classCode="OBS" moodCode="EVN"> <code code="RD" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <effectiveTime value="20041010000000"/> </pertinentReviewDate> </pertinentInformation11> <pertinentInformation5 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <pertinentPrescriptionTreatmentType classCode="OBS" moodCode="EVN"> <!--Treatment Type is "Acute"--> <code code="PTT" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <value code="0002" codeSystem="2.16.840.1.113883.2.1.3.2.4.16.36"/> </pertinentPrescriptionTreatmentType> </pertinentInformation5> <pertinentInformation6 contextConductionInd="false" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <templateId extension="CSAB_RM-NPfITUK10.sourceOf1" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <pertinentCareEventRef classCode="ACT" moodCode="EVN"> <!--This is a care event (encounter) ID. This is a fixed value for etp testing as ETP doesnt care for this ID.--> <id root="04B377BE-ED56-7AD4-A02A-438A76C42262"/> </pertinentCareEventRef> </pertinentInformation6> <pertinentInformation7 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <pertinentDaysSupply classCode="SPLY" moodCode="RQO"> <effectiveTime> <low value="20040604"/> <high value="20041204"/> </effectiveTime> <!--The number of days? treatment that the medications in this prescription are intended to be provide for. This is a fixed value for etp testing as ETP doesnt care what these dates are.--> <expectedUseTime> <low value="20040112000000"/> <high value="20051212000000"/> </expectedUseTime> </pertinentDaysSupply> </pertinentInformation7> <pertinentInformation1 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <pertinentDispensingSitePreference classCode="OBS" moodCode="EVN"> <!--Preference is "None"--> <code code="DISP" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <value code="0001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.21"/> </pertinentDispensingSitePreference> </pertinentInformation1> <pertinentInformation2 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <templateId extension="CSAB_RM-NPfITUK10.sourceOf2" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <pertinentLineItem classCode="SBADM" moodCode="RQO"> <id root="1EE942DF-D593-8D4E-0160-52B9D0CC6F46"/> <code code="18629005" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"> <!--Medication Administration--> </code> <!--Effective Date, Dose Quantity & Rate Quantity are fixed for eTP testing as there are no business rules for ETP.--> <effectiveTime value="20040101"/> <repeatNumber> <low value="0"/> <high value="1"/> </repeatNumber> <doseQuantity> <center unit="tablet" value="1"/> </doseQuantity> <rateQuantity> <low unit="1" value="1"/> <width unit="1" value="1"/> </rateQuantity> <product contextControlCode="OP" typeCode="PRD"> <manufacturedProduct classCode="MANU"> <manufacturedRequestedMaterial classCode="MMAT" determinerCode="KIND"> <code code="12345" codeSystem="2.16.840.1.113883.2.1.3.2.4.15" displayName="Paracetamol"> <!--Code is fixed for ETP Testing. The name can be changed using the Generator Tool.--> </code> </manufacturedRequestedMaterial> </manufacturedProduct> </product> <pertinentInformation1 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="false"/> <pertinentAdditionalInstructions classCode="OBS" moodCode="EVN"> <code code="AI" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <value>Apply sparingly twice a day</value> </pertinentAdditionalInstructions> </pertinentInformation1> <!--Pertinent Information 2 & 3 are fixed in the template as etp sub-system does not process these nodes. For testing manually change these nodes.--> <pertinentInformation2 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="false"/> <pertinentLineItemQuantity classCode="SPLY" moodCode="RQO"> <code code="246205007" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"> <!--Supply--> </code> <quantity unit="grams" value="50"/> </pertinentLineItemQuantity> </pertinentInformation2> <pertinentInformation3 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="false"/> <pertinentPrescriberEndorsement classCode="OBS" moodCode="EVN"> <code code="PE" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <text>Prescriber endorsement text</text> <value code="CC" codeSystem="2.16.840.1.113883.2.1.3.2.4.16.32"/> </pertinentPrescriberEndorsement> </pertinentInformation3> <pertinentInformation4 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="false"/> <pertinentDosageInstructions classCode="OBS" moodCode="EVN"> <code code="DI" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.30"/> <value>One tablet two times a day daily</value> </pertinentDosageInstructions> </pertinentInformation4> <inFulfillmentOf contextConductionInd="false" inversionInd="false" negationInd="false" typeCode="FLFS"> <seperatableInd value="false"/> <templateId extension="CSAB_RM-NPfITUK10.sourceOf1" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <priorOriginalItemRef classCode="SBADM" moodCode="RQO"> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </priorOriginalItemRef> </inFulfillmentOf> </pertinentLineItem> </pertinentInformation2> <pertinentInformation4 contextConductionInd="true" inversionInd="false" negationInd="false" typeCode="PERT"> <seperatableInd value="true"/> <pertinentPrescriptionType> <code code="2.16.840.1.113883.2.1.3.2.4.17.30" codeSystem="PT"/> <value code="0001" codeSystem="2.16.840.1.113883.2.1.3.2.4.17.25"/> </pertinentPrescriptionType> </pertinentInformation4> <inFulfillmentOf contextConductionInd="false" inversionInd="false" negationInd="false" typeCode="FLFS"> <seperatableInd value="true"/> <templateId extension="CSAB_RM-NPfITUK10.sourceOf1" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <priorOriginalPrescriptionRef classCode="SBADM" moodCode="RQO"> <!--ID fixed for ETP testing. This represents the Original Prescription in case of Repeat prescriptions. Remove manually if not required.--> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </priorOriginalPrescriptionRef> </inFulfillmentOf> </pertinentPrescription> </pertinentInformation1> <pertinentInformation2 typeCode="PERT"> <templateId extension="CSAB_RM-NPfITUK10.pertinentInformation1" root="2.16.840.1.113883.2.1.3.2.4.18.2"/> <pertinentCareRecordElementCategory classCode="CATEGORY" moodCode="EVN"> <code code="16076005" codeSystem="2.16.840.1.113883.2.1.3.2.4.15"/> <component typeCode="COMP"> <actRef classCode="SBADM" moodCode="RQO"> <!-- Prescription ID --> <id root="6E03AD7E-EA82-9B85-EDA6-CE07280C74D3"/> </actRef> </component> <component typeCode="COMP"> <actRef classCode="SBADM" moodCode="RQO"> <!-- Line Item ID --> <id root="DD515706-6A95-DBB2-1952-75462624B044"/> </actRef> </component> </pertinentCareRecordElementCategory> </pertinentInformation2><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <ds:Reference URI="" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:Transforms xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <xsl:stylesheet version="1.0" xmlns:hl7="urn:hl7-org:v3" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output encoding="UTF-8" method="xml" version="1.0"/><!--This template sets the root node to Prescription--><xsl:template match="hl7:pertinentPrescription"> <FragmentsToBeHashed> <Fragment> <xsl:copy-of select="hl7:author/hl7:time"/> <xsl:copy-of select="hl7:id[not(@extension)]"/> </Fragment> <Fragment> <xsl:copy-of select="hl7:author/hl7:AgentPerson"/> </Fragment> <Fragment> <xsl:copy-of select="../../hl7:recordTarget"/> </Fragment> <xsl:for-each select="hl7:pertinentInformation2/hl7:pertinentLineItem"> <Fragment> <xsl:apply-templates mode="LineItem" select="."/> </Fragment> </xsl:for-each> </FragmentsToBeHashed></xsl:template> <!-- filtering out itemStatus and repeatNumber/low --><xsl:template match="@*|node()" mode="LineItem"> <xsl:copy> <xsl:apply-templates mode="LineItem" select="@*|node()"/> </xsl:copy></xsl:template><xsl:template match="hl7:low[local-name(..)='repeatNumber']" mode="LineItem"/><!--This overrides the built in template that includes any text nodes in the output document--><xsl:template match="text()"/></xsl:stylesheet> </ds:Transform> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">TK9FulSz5ELuOtf38MSUK4VLTw8=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> fWdJIR2i0WhgKbu0uvub1Melja8S4dAVDtllGsgOeHv2o5ys1vMxFIE/xHti4T4syszok9E3fMwv wdQpXdZttBQ+MvaMaXUCjyLsyohVO8/4mTmyGhjwesWcGj5nwyonrygzgNW5sPo1ni/FgtHdFEfl kAl8l3aFhfZ43cR+s7Q= </ds:SignatureValue> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:KeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:RSAKeyValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:Modulus xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> n+L3Z96vXtSZ8Z++pXp4njRy6NdOvH6fCHVZ141KKeu7XCWrSNFtnD1vKx1KpZ2UUW3PzH9y5bjJ d1CKW/BosaJXPmLCHi6Xzj+ptLoxlaNQTlIsYEK5p/piL9ph5AHELI/aHXBW5QdSX41OrsFJUG9F pYwG5dl0V83I2rnQ5h0= </ds:Modulus> <ds:Exponent xmlns:ds="http://www.w3.org/2000/09/xmldsig#">AQAB</ds:Exponent> </ds:RSAKeyValue> </ds:KeyValue> </ds:KeyInfo> </ds:Signature></ParentPrescription>