-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* NCPDP SCRIPT v2017071 Support */ | ||
import { XMLBuilder } from 'fast-xml-parser'; | ||
|
||
export default function buildRxStatus(caseNumber, doctorName, drugNames) { | ||
var time = new Date(); | ||
var rxStatus = | ||
{ | ||
"RxStatus": [ | ||
Check failure on line 8 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
{ | ||
"Message": [ | ||
Check failure on line 10 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
{ | ||
"Header": [ | ||
Check failure on line 12 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
{ | ||
"To": doctorName | ||
Check failure on line 14 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
}, | ||
{ | ||
"From": "Pharmacy" // Placeholder: This is dependant on individual pharmacy | ||
Check failure on line 17 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
Check failure on line 17 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
Check failure on line 17 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
}, | ||
{ | ||
"Message": "NewRx Request Recieved For: " + drugNames | ||
Check failure on line 20 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
Check failure on line 20 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
Check failure on line 20 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
}, | ||
{ | ||
"RelatesToMessageID": caseNumber // Placeholder: This is dependant on individual pharmacy, using Case Number | ||
Check failure on line 23 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
}, | ||
{ | ||
"Time": time | ||
Check failure on line 26 in backend/src/ncpdpScriptBuilder/buildScript.v2017071.js GitHub Actions / Check tsc, lint, and prettier on back end
|
||
}, | ||
] | ||
}, | ||
{ | ||
"Body": [ | ||
{ | ||
"Status": [ | ||
{ | ||
"Code": "200" // Placeholder: This is dependant on individual pharmacy | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
] | ||
} | ||
] | ||
}; | ||
const builder = new XMLBuilder({ oneListGroup: "true" }); | ||
var RxStatus = builder.build(rxStatus); | ||
|
||
return RxStatus; | ||
} |