source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMRPC.m@ 846

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1PXRMRPC ; SLC/PJH - PXRM REMINDER GUI - routine for RPC ;12/20/2000
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 Q
4 ;
5TAG(PXRMY,PXRMTAG,PXRMX) ;Entry point for all RPC calls
6 ;
7 I PXRMTAG="ALL" D ALL(.PXRMY) Q
8 I PXRMTAG="INI" D INI(.PXRMY) Q
9 I PXRMTAG="INQ" D REMVAR^PXRMINQ(.PXRMY,PXRMX) Q
10 I PXRMTAG="EXC" D EXC(.PXRMY) Q
11 I PXRMTAG="CMP" D CMP(.PXRMY,PXRMX) Q
12 I PXRMTAG="RPC" D RPC(.PXRMY) Q
13 ;
14 S PXRMY(1)="-1^INVALID"
15 ;
16 Q
17 ;
18 ;
19ALL(ORY) ;All active reminders
20 ;print name^ien
21 N ARR,DATA,NAME,ORREM,OCNT,SUB
22 S ORREM=0
23 F S ORREM=$O(^PXD(811.9,ORREM)) Q:'ORREM D
24 .S DATA=$G(^PXD(811.9,ORREM,0)) Q:DATA=""
25 .;Skip inactive reminders
26 .I $P(DATA,U,6) Q
27 .;Skip reminders with no name
28 .S NAME=$P(DATA,U,3) I NAME="" Q
29 .;Sort by name
30 .S ARR(NAME_U_ORREM)=""
31 ; Build output arrray
32 S SUB="",OCNT=0
33 F S SUB=$O(ARR(SUB)) Q:SUB="" D
34 .S OCNT=OCNT+1
35 .S ORY(OCNT)=SUB
36 Q
37 ;
38CMP(PXRMY,IEN) ;List Exchange Repository Entries
39 N CNT,DATA,CMPIEN,SUB
40 D CDISP^PXRMEXLC(IEN)
41 S CNT=0,SUB=""
42 F S SUB=$O(^TMP("PXRMEXLC",$J,SUB)) Q:'SUB D
43 .S DATA=$G(^TMP("PXRMEXLC",$J,SUB,0)) Q:DATA="" Q:DATA=" "
44 .S CMPIEN=$G(^TMP("PXRMEXLC",$J,"IDX",SUB,SUB))
45 .S CNT=CNT+1,PXRMY(CNT)=DATA_U_CMPIEN
46 Q
47 ;
48EXC(PXRMY) ;List Exchange Repository Entries
49 N CNT,DATA,REPIEN,SUB
50 D BLDLIST^PXRMEXLC(0)
51 S CNT=0,SUB=""
52 F S SUB=$O(^TMP("PXRMEXLR",$J,SUB)) Q:'SUB D
53 .S DATA=$G(^TMP("PXRMEXLR",$J,SUB,0)) Q:DATA=""
54 .S REPIEN=$G(^TMP("PXRMEXLR",$J,"IDX",SUB,SUB))
55 .S CNT=CNT+1,PXRMY(CNT)=$P(DATA," ",3,99)_U_REPIEN
56 Q
57 ;
58INI(PXRMY) ;Lists available RPC calls
59 ;
60 S PXRMY(1)="Reminder Maintenance^ALL"
61 S PXRMY(2)="Reminder Exchange^EXC"
62 S PXRMY(3)="Test RPC^RPC"
63 S PXRMY(4)="Other Options^OTH"
64 Q
65 ;
66RPC(PXRMY) ;Test bed
67 ;
68 D SEL^PXRMRPCD(.PXRMY)
69 Q
70 ;
71XALL(ORY,FROM,DIR) ;All active dialogs
72 ;
73 ; Input parameters
74 ; FROM - dialog name
75 ; DIR - direction (1/-1)
76 ;
77 N CNT,DATA,DIEN,IC,TYPE
78 S CNT=44,IC=0
79 F Q:IC'<CNT S FROM=$O(^PXRMD(801.41,"B",FROM),DIR) Q:FROM="" D
80 .S DIEN=0
81 .F S DIEN=$O(^PXRMD(801.41,"B",FROM,DIEN)) Q:'DIEN D
82 ..S DATA=$G(^PXRMD(801.41,DIEN,0)) Q:DATA=""
83 ..;Only reminder dialogs
84 ..S TYPE=$P(DATA,U,4) Q:TYPE'="R"
85 ..;Skip diabled dialogs
86 ..I $P(DATA,U,3)]"" Q
87 ..;Sort by name
88 ..S IC=IC+1,ORY(IC)=DIEN_U_FROM
89 Q
Note: See TracBrowser for help on using the repository browser.