source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRAROBS.m@ 1582

Last change on this file since 1582 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1GMRAROBS ;HIRMFO/RFM,WAA-OBSERVED REACTION DATA EDIT ;12/22/04 10:37
2 ;;4.0;Adverse Reaction Tracking;**8,21**;Mar 29, 1996
3EN1 ; Entry for EDIT OBSERVED REACTION DATA option
4 S GMRAOUT=0,GMRALAGO=1 D EN1^GMRAU85 G:GMRAPA1'>0 EXIT
5 S GMRAPA=0 D ^GMRADSP7 D EN2
6 D UNLOCK^GMRAUTL(120.85,GMRAPA1)
7 D EXIT
8 Q
9EN2 ; ENTRY FROM ENTER/EDIT OPTION GMRAPA1 AND GMRAPA ARE KNOWN
10 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
11 D:'$D(GMRASITE) SITE^GMRAUTL S GMRASITE(0)=^GMRD(120.84,+GMRASITE,0)
12 G:$P(GMRAPA(0),U,20)'["D" EXIT
13 G:$P(GMRASITE(0),U,7)="y" FDA
14 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)
15 I %'=1 K % G EXIT
16FDA D EN1^GMRAPEL0 G:GMRAOUT EXIT
17FDA1 W @IOF,!,"Indicate which FDA Report Sections to be completed:"
18 W !,"1. Reaction Information",!,"2. Suspect Drug(s) Information",!,"3. Concomitant Drugs and History",!,"4. Initial Reporter"
19 K DIR S DIR("A")="Choose number(s) of sections to be edited",DIR(0)="LO^1:4"
20 S DIR(0)=DIR(0)_"^I X[""."" W !,""DO NOT USE DECIMAL VALUES."",$C(7) K X Q"
21 S DIR("?",1)="ENTER THE NUMBER SECTION OR SECTIONS YOU WISH TO COMPLETE."
22 S DIR("?",2)="YOU CAN ENTER: YOU TYPE SYSTEM WILL DO"
23 S DIR("?",3)=" SECTION --> 1 SECTION 1"
24 S DIR("?",4)=" RANGE --> 2-4 SECTION 2 AND 3 AND 4"
25 S DIR("?",5)=" GROUPS --> 1,3,4 SECTION 1 AND 3 AND 4"
26 S DIR("B")="1-4"
27 D ^DIR K DIR G:$D(DIRUT)!(+Y'>0) EXIT
28 K GMRAGHC F X=1:1 S GMRAX=$P(Y,",",X) Q:GMRAX']"" S GMRAGHC(GMRAX)=""
29 F GMRAXXX=0:0 S GMRAXXX=$O(GMRAGHC(GMRAXXX)) Q:GMRAXXX'>0 D @GMRAXXX S:$D(Y) GMRAOUT=1 Q:GMRAOUT
30EXIT ;
31 K GMRAGHC,GMRAX,GMRAXXX,Y,X,DA,DIE,DR,GMRADT,GMRABGDT,GMRAENDT,XMB,XMY,VA
32 Q
331 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
34 Q
352 W @IOF S GMRAOUT=0 K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR2 K GMRADT,GMRABGDT,GMRAENDT
36 Q
373 W @IOF S GMRAOUT=0 K GMRADT,GMRABGDT,GMRAENDT D EN1^GMRAPHR1 Q:GMRAOUT
38 W ! S DA=GMRAPA1,DIE="^GMR(120.85,",DR="14" D ^DIE
39 K GMRADT,GMRABGDT,GMRAENDT
40 Q
414 N GMRAT W @IOF
42 S GMRAT=$$GET1^DIQ(200,DUZ_",","8","I") ;21
43 S:GMRAT'="" GMRAT=$P($G(^DIC(3.1,GMRAT,0)),U)
44 S DIE="^GMR(120.85,",DA=GMRAPA1
45 S DR="43//"_$$GET1^DIQ(200,DUZ_",",".01")_";44;45;46;47;48;49;50;51T;52T;52.1//"_GMRAT ;21
46 D ^DIE
47 Q
48 ;
49PTBUL ;Fire off the P&T FDA bul
50 D NOW^%DTC
51 ;1=PATIENT NAME
52 ;2=PATIENT SSN
53 ;3=REACTANT
54 ;4=SIGNED OFF BY
55 ;5=NOW
56 S DFN=$P(GMRAPA(0),U) D PID^VADPT6
57 S XMB(1)=$P(^DPT(DFN,0),U)
58 S XMB(2)="("_VA("PID")_")" K VA
59 S XMB(3)=$P(GMRAPA(0),U,2),XMB(4)=$$GET1^DIQ(200,DUZ_",",".01") ;21
60 S Y=$$DATE^GMRAUTL1(%) S XMB(5)=Y,XMB="GMRA P&T COMMITTEE FDA"
61 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
62 S XMY("G.GMRA P&T COMMITTEE FDA")=""
63 D ^XMB
64 Q
Note: See TracBrowser for help on using the repository browser.