65 lines
3.0 KiB
Mathematica
65 lines
3.0 KiB
Mathematica
|
GMRAROBS ;HIRMFO/RFM,WAA-OBSERVED REACTION DATA EDIT ;12/22/04 10:37
|
||
|
;;4.0;Adverse Reaction Tracking;**8,21**;Mar 29, 1996
|
||
|
EN1 ; Entry for EDIT OBSERVED REACTION DATA option
|
||
|
S GMRAOUT=0,GMRALAGO=1 D EN1^GMRAU85 G:GMRAPA1'>0 EXIT
|
||
|
S GMRAPA=0 D ^GMRADSP7 D EN2
|
||
|
D UNLOCK^GMRAUTL(120.85,GMRAPA1)
|
||
|
D EXIT
|
||
|
Q
|
||
|
EN2 ; ENTRY FROM ENTER/EDIT OPTION GMRAPA1 AND GMRAPA ARE KNOWN
|
||
|
S DIE="^GMR(120.85,",DA=GMRAPA1,DR=".01;.5//"_$$GET1^DIQ(200,DUZ_",",".01")_";14.5;22//"_$$DATE^GMRAUTL1($P(^GMR(120.85,DA,0),U)) D ^DIE G:$D(Y)!('$D(DA)) EXIT ;21
|
||
|
D:'$D(GMRASITE) SITE^GMRAUTL S GMRASITE(0)=^GMRD(120.84,+GMRASITE,0)
|
||
|
G:$P(GMRAPA(0),U,20)'["D" EXIT
|
||
|
G:$P(GMRASITE(0),U,7)="y" FDA
|
||
|
F S %=1 W !,"Complete the FDA data" D YN^DICN S:%<0 %=2 Q:% W !,"ENTER YES TO EDIT FDA DATA ENTER NO TO SKIP FDA DATA",$C(7)
|
||
|
I %'=1 K % G EXIT
|
||
|
FDA D EN1^GMRAPEL0 G:GMRAOUT EXIT
|
||
|
FDA1 W @IOF,!,"Indicate which FDA Report Sections to be completed:"
|
||
|
W !,"1. Reaction Information",!,"2. Suspect Drug(s) Information",!,"3. Concomitant Drugs and History",!,"4. Initial Reporter"
|
||
|
K DIR S DIR("A")="Choose number(s) of sections to be edited",DIR(0)="LO^1:4"
|
||
|
S DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
|
||
|
S DIR("?",1)="ENTER THE NUMBER SECTION OR SECTIONS YOU WISH TO COMPLETE."
|
||
|
S DIR("?",2)="YOU CAN ENTER: YOU TYPE SYSTEM WILL DO"
|
||
|
S DIR("?",3)=" SECTION --> 1 SECTION 1"
|
||
|
S DIR("?",4)=" RANGE --> 2-4 SECTION 2 AND 3 AND 4"
|
||
|
S DIR("?",5)=" GROUPS --> 1,3,4 SECTION 1 AND 3 AND 4"
|
||
|
S DIR("B")="1-4"
|
||
|
D ^DIR K DIR G:$D(DIRUT)!(+Y'>0) EXIT
|
||
|
K GMRAGHC F X=1:1 S GMRAX=$P(Y,",",X) Q:GMRAX']"" S GMRAGHC(GMRAX)=""
|
||
|
F GMRAXXX=0:0 S GMRAXXX=$O(GMRAGHC(GMRAXXX)) Q:GMRAXXX'>0 D @GMRAXXX S:$D(Y) GMRAOUT=1 Q:GMRAOUT
|
||
|
EXIT ;
|
||
|
K GMRAGHC,GMRAX,GMRAXXX,Y,X,DA,DIE,DR,GMRADT,GMRABGDT,GMRAENDT,XMB,XMY,VA
|
||
|
Q
|
||
|
1 W @IOF D RXN^GMRAU851 Q:GMRAOUT W ! S DA=GMRAPA1,DIE="^GMR(120.85,",DR="5T;6T;7T;9T;10T;11T;12.1T;12.2T" D ^DIE K GMRADT,GMRABGDT,GMRAENDT W !! D EN1^GMRALAB0 K GMRADT,GMRABGDT,GMRAENDT
|
||
|
Q
|
||
|
2 W @IOF S GMRAOUT=0 K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR2 K GMRADT,GMRABGDT,GMRAENDT
|
||
|
Q
|
||
|
3 W @IOF S GMRAOUT=0 K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR1 Q:GMRAOUT
|
||
|
W ! S DA=GMRAPA1,DIE="^GMR(120.85,",DR="14" D ^DIE
|
||
|
K GMRADT,GMRABGDT,GMRAENDT
|
||
|
Q
|
||
|
4 N GMRAT W @IOF
|
||
|
S GMRAT=$$GET1^DIQ(200,DUZ_",","8","I") ;21
|
||
|
S:GMRAT'="" GMRAT=$P($G(^DIC(3.1,GMRAT,0)),U)
|
||
|
S DIE="^GMR(120.85,",DA=GMRAPA1
|
||
|
S DR="43//"_$$GET1^DIQ(200,DUZ_",",".01")_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT ;21
|
||
|
D ^DIE
|
||
|
Q
|
||
|
;
|
||
|
PTBUL ;Fire off the P&T FDA bul
|
||
|
D NOW^%DTC
|
||
|
;1=PATIENT NAME
|
||
|
;2=PATIENT SSN
|
||
|
;3=REACTANT
|
||
|
;4=SIGNED OFF BY
|
||
|
;5=NOW
|
||
|
S DFN=$P(GMRAPA(0),U) D PID^VADPT6
|
||
|
S XMB(1)=$P(^DPT(DFN,0),U)
|
||
|
S XMB(2)="("_VA("PID")_")" K VA
|
||
|
S XMB(3)=$P(GMRAPA(0),U,2),XMB(4)=$$GET1^DIQ(200,DUZ_",",".01") ;21
|
||
|
S Y=$$DATE^GMRAUTL1(%) S XMB(5)=Y,XMB="GMRA P&T COMMITTEE FDA"
|
||
|
N GMRACNT S GMRACNT=0 K ^TMP("TIUP",$J) D ADDCOM^GMRAPET0("O",.GMRACNT) I $G(GMRACNT) S XMTEXT="^TMP(""TIUP"",$J)" ;21 Add originator comments to bulletin if they exist
|
||
|
S XMY("G.GMRA P&T COMMITTEE FDA")=""
|
||
|
D ^XMB
|
||
|
Q
|