Medication History XML Examples
5 min
these examples are above and beyond those found in the ncpdp examples please note that the xml examples in this section are medication history for reconciliation examples note version 20230115, which is a republication of version 2023011, is used throughout this guide rxhistoryrequest – provider vendor to surescripts \<?xml version="1 0" encoding="utf 8"?> \<message datatypesversion="20230115" transportversion="20230115" transactiondomain="script" transactionversion="20230115" structuresversion="20230115" eclversion="20230115"> \<header> \<to qualifier="zzz">s00000000000002\</to> \<from qualifier="zzz">d00000000104445\</from> \<messageid>c93be73261c6b16509df078d25538ca3\</messageid> \<senttime>2024 05 08t15 45 28 483z\</senttime> \<sendersoftware> \<sendersoftwaredeveloper>ehr123\</sendersoftwaredeveloper> \<sendersoftwareproduct>medhistory message manager\</sendersoftwareproduct> \<sendersoftwareversionrelease>0 1\</sendersoftwareversionrelease> \</sendersoftware> \<testmessage>1\</testmessage> \</header> \<body> \<rxhistoryrequest> \<benefitscoordination> \<payeridentification> \<mutuallydefined>interchangecontrolnumber\</mutuallydefined> \</payeridentification> \<consent>y\</consent> \</benefitscoordination> \<patient> \<humanpatient> \<names> \<name> \<lastname>abingdon\</lastname> \<firstname>perseus\</firstname> \</name> \</names> \<genderandsex> \<administrativegender>m\</administrativegender> \</genderandsex> \<dateofbirth> \<date>2012 09 01\</date> \</dateofbirth> \<address> \<addressline1>1 washington st\</addressline1> \<city>montgomery\</city> \<stateprovince>al\</stateprovince> \<postalcode>10805\</postalcode> \</address> \</humanpatient> \</patient> \<prescriber> \<nonveterinarian> \<identification> \<npi>1962441741\</npi> \</identification> \<practicelocation> \<businessname>montgomery health clinic\</businessname> \</practicelocation> \<names> \<name> \<lastname>jonson\</lastname> \<firstname>tim\</firstname> \</name> \</names> \</nonveterinarian> \</prescriber> \<requesteddates> \<startdate> \<date>2023 05 09\</date> \</startdate> \<enddate> \<date>2024 05 08\</date> \</enddate> \</requesteddates> \</rxhistoryrequest> \</body> \</message> rxhistoryresponse – surescripts to provider vendor \<?xml version="1 0" encoding="utf 8"?> \<message datatypesversion="20230115" transportversion="20230115" transactiondomain="script" transactionversion="20230115" structuresversion="20230115" eclversion="20230115"> \<header> \<to qualifier="zzz">d00000000104445\</to> \<from qualifier="zzz">s00000000000002\</from> \<messageid>bb893f170da14f0d94527055c9698f9f\</messageid> \<relatestomessageid>c93be73261c6b16509df078d25538ca3\</relatestomessageid> \<senttime>2024 05 08t15 45 35 755z\</senttime> \<sendersoftware> \<sendersoftwaredeveloper>surescripts\</sendersoftwaredeveloper> \<sendersoftwareproduct>medication history\</sendersoftwareproduct> \<sendersoftwareversionrelease>42 0 0\</sendersoftwareversionrelease> \</sendersoftware> \<testmessage>1\</testmessage> \</header> \<body> \<rxhistoryresponse> \<response> \<approved/> \</response> \<benefitscoordination> \<payeridentification> \<mutuallydefined>interchangecontrolnumber\</mutuallydefined> \</payeridentification> \<consent>y\</consent> \</benefitscoordination> \<patient> \<humanpatient> \<names> \<name> \<lastname>abingdon\</lastname> \<firstname>perseus\</firstname> \</name> \</names> \<genderandsex> \<administrativegender>m\</administrativegender> \</genderandsex> \<dateofbirth> \<date>2012 09 01\</date> \</dateofbirth> \<address> \<addressline1>1 washington st\</addressline1> \<city>montgomery\</city> \<stateprovince>al\</stateprovince> \<postalcode>10805\</postalcode> \</address> \</humanpatient> \</patient> \<prescriber> \<nonveterinarian> \<identification> \<npi>1962441741\</npi> \</identification> \<practicelocation> \<businessname>montgomery health clinic\</businessname> \</practicelocation> \<names> \<name> \<lastname>jonson\</lastname> \<firstname>tim\</firstname> \</name> \</names> \</nonveterinarian> \</prescriber> \<medicationdispensed> \<drugdescription>sprycel 70 mg tablet\</drugdescription> \<product> \<drugcoded> \<ndc>00003052411\</ndc> \<productcode> \<code>643177\</code> \<qualifier>sbd\</qualifier> \</productcode> \<strength> \<strengthvalue>70\</strengthvalue> \<strengthform> \<code>c42998\</code> \</strengthform> \<strengthunitofmeasure> \<code>c28253\</code> \</strengthunitofmeasure> \</strength> \</drugcoded> \</product> \<quantity> \<value>60\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c48542\</code> \</quantityunitofmeasure> \</quantity> \<dayssupply>60\</dayssupply> \<writtendate> \<date>2024 04 13\</date> \</writtendate> \<lastfilldate> \<date>2024 04 13\</date> \</lastfilldate> \<substitutions> \<substitutions>1\</substitutions> \</substitutions> \<diagnosis> \<clinicalinformationqualifier>1\</clinicalinformationqualifier> \<qualifier>abf\</qualifier> \<value>c921\</value> \<description>chronic myelogenous leukemia, philadelphia chromosome (ph1) positive\</description> \</diagnosis> \<priorauthorizationnumber>ab829933 xhjs2\</priorauthorizationnumber> \<priorauthorizationstatus>a\</priorauthorizationstatus> \<refillsremaining>1\</refillsremaining> \<historyprescriberordernumber>pa 5434\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<medicationdispensed> \<drugdescription>methylprednisolone 4 mg dosepak\</drugdescription> \<product> \<drugcoded> \<ndc>59762444002\</ndc> \<productcode> \<code>762675\</code> \<qualifier>gpk\</qualifier> \</productcode> \<strength> \<strengthvalue>4\</strengthvalue> \<strengthform> \<code>c42998\</code> \</strengthform> \<strengthunitofmeasure> \<code>c28253\</code> \</strengthunitofmeasure> \</strength> \</drugcoded> \</product> \<quantity> \<value>21\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c48542\</code> \</quantityunitofmeasure> \</quantity> \<dayssupply>21\</dayssupply> \<writtendate> \<date>2024 03 30\</date> \</writtendate> \<lastfilldate> \<date>2024 03 30\</date> \</lastfilldate> \<substitutions> \<substitutions>0\</substitutions> \</substitutions> \<diagnosis> \<clinicalinformationqualifier>1\</clinicalinformationqualifier> \<qualifier>abf\</qualifier> \<value>h1032\</value> \<description>unspecified acute conjunctivitis, left eye\</description> \</diagnosis> \<refillsremaining>0\</refillsremaining> \<historyprescriberordernumber>pa 5398\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<medicationdispensed> \<drugdescription>bd 3ml syringe 25g x 1\</drugdescription> \<quantity> \<value>30\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c48540\</code> \</quantityunitofmeasure> \</quantity> \<writtendate> \<date>2024 03 19\</date> \</writtendate> \<lastfilldate> \<date>2024 03 19\</date> \</lastfilldate> \<substitutions> \<substitutions>0\</substitutions> \</substitutions> \<historyprescriberordernumber>pa 5388\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<medicationdispensed> \<drugdescription>dexamethasone 4 mg/ml vial\</drugdescription> \<product> \<drugcoded> \<ndc>00641614501\</ndc> \<productcode> \<code>1116927\</code> \<qualifier>scd\</qualifier> \</productcode> \<strength> \<strengthvalue>4\</strengthvalue> \<strengthform> \<code>c42986\</code> \</strengthform> \<strengthunitofmeasure> \<code>c42576\</code> \</strengthunitofmeasure> \</strength> \</drugcoded> \</product> \<quantity> \<value>30\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c28254\</code> \</quantityunitofmeasure> \</quantity> \<dayssupply>30\</dayssupply> \<writtendate> \<date>2024 03 19\</date> \</writtendate> \<lastfilldate> \<date>2024 03 19\</date> \</lastfilldate> \<substitutions> \<substitutions>0\</substitutions> \</substitutions> \<diagnosis> \<clinicalinformationqualifier>1\</clinicalinformationqualifier> \<qualifier>abf\</qualifier> \<value>m659\</value> \<description>synovitis and tenosynovitis, unspecified\</description> \</diagnosis> \<refillsremaining>0\</refillsremaining> \<historyprescriberordernumber>pa 5387\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<medicationdispensed> \<drugdescription>doxycycline hyclate 100 mg capsule\</drugdescription> \<product> \<drugcoded> \<ndc>00143314250\</ndc> \<productcode> \<code>1649988\</code> \<qualifier>scd\</qualifier> \</productcode> \<strength> \<strengthvalue>100\</strengthvalue> \<strengthform> \<code>c25158\</code> \</strengthform> \<strengthunitofmeasure> \<code>c28253\</code> \</strengthunitofmeasure> \</strength> \</drugcoded> \</product> \<quantity> \<value>20\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c48480\</code> \</quantityunitofmeasure> \</quantity> \<dayssupply>10\</dayssupply> \<writtendate> \<date>2024 02 07\</date> \</writtendate> \<lastfilldate> \<date>2024 02 07\</date> \</lastfilldate> \<substitutions> \<substitutions>0\</substitutions> \</substitutions> \<diagnosis> \<clinicalinformationqualifier>1\</clinicalinformationqualifier> \<qualifier>abf\</qualifier> \<value>n390\</value> \<description>chronic urinary tract infection\</description> \</diagnosis> \<refillsremaining>0\</refillsremaining> \<historyprescriberordernumber>pa 5369\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<medicationdispensed> \<drugdescription>tobramycin and dexamethasone ophthalmic suspension\</drugdescription> \<product> \<nondrugcoded> \<productcode> \<code>24208029510\</code> \<qualifier>up\</qualifier> \</productcode> \<productcode> \<code>309683\</code> \<qualifier>scd\</qualifier> \</productcode> \<strength> \<strengthvalue>3/1\</strengthvalue> \<strengthunitofmeasure> \<code>c28253\</code> \</strengthunitofmeasure> \</strength> \<deaschedule> \<code>c48679\</code> \</deaschedule> \</nondrugcoded> \</product> \<quantity> \<value>10\</value> \<codelistqualifier>87\</codelistqualifier> \<quantityunitofmeasure> \<code>c28254\</code> \</quantityunitofmeasure> \</quantity> \<dayssupply>7\</dayssupply> \<writtendate> \<date>2024 01 11\</date> \</writtendate> \<lastfilldate> \<date>2024 01 11\</date> \</lastfilldate> \<substitutions> \<substitutions>0\</substitutions> \</substitutions> \<diagnosis> \<clinicalinformationqualifier>1\</clinicalinformationqualifier> \<qualifier>abf\</qualifier> \<value>h10502\</value> \<description>unspecified blepharoconjunctivitis, left eye\</description> \</diagnosis> \<priorauthorizationstatus>a\</priorauthorizationstatus> \<refillsremaining>0\</refillsremaining> \<historyprescriberordernumber>pa 5358\</historyprescriberordernumber> \<historysource> \<source> \<sourcedescription>proinforma pbm\</sourcedescription> \<sourcequalifier>payer\</sourcequalifier> \</source> \</historysource> \</medicationdispensed> \<requesteddates> \<startdate> \<date>2023 05 09\</date> \</startdate> \<enddate> \<date>2024 05 08\</date> \</enddate> \</requesteddates> \</rxhistoryresponse> \</body> \</message> rxhistoryresponse note description the events shown in the table below will not cause an error to be sent to the customer, but instead will return a note in the rxhistoryresponse/response field event note sent in rxhistoryresponse comments surescripts cannot find the patient identified patient not found surescripts cannot obtain results from any data source due to an error occurring while attempting to get results a processing error occurred no medication history was returned an error occurred while processing the report no medication history was returned examples of errors include, but are not limited to error response timeout from a data source surescripts receives medication records from one data source and at least one error from another data source where the error indicates that there are potentially medication records to be retrieved not all medication history sources were accessible at this time not all available results may be present in this report not all information sources were accessible at this time patient was found, but no medications were found for the date range specified although a patient record was found, no medications were available a patient record was found, but no medication(s) were found or the medication(s) that could be found are for dates outside the range provided by customer codified field usage for federal medication terminologies (fmt) codes note for a list of fmt codes, go to http //evs nci nih gov/ftp1/ncpdp/about html http //evs nci nih gov/ftp1/ncpdp/about html use the valid value from the appropriate row of the downloaded data this list should be updated on a monthly basis the table below includes some example fields codified field/field code comment strengthform/code use the ncpdp strengthform terminology rows from the downloaded data this list should be updated on a monthly basis strengthunitofmeasure/code use the ncpdp strengthunitofmeasure terminology rows from the downloaded data quanityunitofmeasure/code use the ncpdp quantityunitofmeasure terminology rows from the downloaded data deaschedule use the ncpdp deaschedule terminology rows from the downloaded data