diff --git a/p/C0XPT3.m b/p/C0XPT3.m index c3551b0..7e856ee 100644 --- a/p/C0XPT3.m +++ b/p/C0XPT3.m @@ -1,5 +1,7 @@ -C0XPT3 ;ISI/MLS,VEN/SMH -- MEDS IMPORT ;2013-04-10 6:54 PM +C0XPT3 ;ISI/MLS,VEN/SMH -- MEDS IMPORT ;2013-04-19 5:42 PM ;;1.0;FILEMAN TRIPLE STORE;;Jun 26,2012;Build 29 + ; (C) Sam Habiel 2013 + ; Proprietary code. Stay out! ; MEDS(G,DFN) ; Private Proc; Extract Medication Data from a Patient's Graph ; G - Patient Graph, DFN - you should know this @@ -96,7 +98,9 @@ PREP(DFN,RXN,INST,FILDT,FILQTY,FILDAYS,FILLS) ; N PROV S PROV=$$NP^C0XPT0() ;NEW PERSON FILE (#200) I $$ISBRAND^C0CRXNLK(RXN) S RXN=$$BR2GEN^C0CRXNLK(RXN) ; Get Generic Drug for Brand N LOCALDRUG S LOCALDRUG=+$$RXN2MEDS^C0CRXNLK(RXN) - I 'LOCALDRUG S LOCALDRUG=$$ADDDRUG(RXN) + ; I 'LOCALDRUG S LOCALDRUG=$$ADDDRUG^C0CRXNAD(RXN) + I LOCALDRUG N DIK,DA S DIK="^PSDRUG(",DA=LOCALDRUG D ^DIK + S LOCALDRUG=$$ADDDRUG^C0CRXNAD(RXN) W "(debug) Local Drug IEN: "_LOCALDRUG,! N PSODRUG S PSODRUG=LOCALDRUG ;POINTER TO DRUG FILE (#50) ; TODO: HARDCODED; RXN S PSODRUG("DEA")=$P($G(^PSDRUG(PSODRUG,0)),U,3)