source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMRPCD.m@ 629

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

initial load of WorldVistAEHR

File size: 3.0 KB
RevLine 
[613]1PXRMRPCD ;SLC/PJH - PXRM REMINDER DIALOG ;06/08/2001
2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
3 ;
4 ; Used by CPRS - see DBIA #3295/#3296/#3332
5 ;
6 ;
7CATEGORY(ORY,CIEN) ;Get category information
8 ;
9 ; Input parameter Category ien [#811.7]
10 ;
11 N DATA,IC,IEN,NAME,PNAME,RIEN,SEQ,SUB,TEMP,USAGE
12 S IC=0
13 ;Get category name
14 S NAME=$G(^PXRMD(811.7,CIEN,0)) I NAME="" Q
15 ;
16 ;Sort Reminders from this category into display sequence
17 S SUB=0 K TEMP
18 F S SUB=$O(^PXRMD(811.7,CIEN,2,SUB)) Q:SUB="" D
19 .S DATA=$G(^PXRMD(811.7,CIEN,2,SUB,0)) Q:DATA=""
20 .S RIEN=$P(DATA,U) Q:'RIEN
21 .S SEQ=$P(DATA,U,2)_0
22 .;Include only CPRS reminders
23 .S USAGE=$P($G(^PXD(811.9,RIEN,100)),U,4) I USAGE'["C",USAGE'["*" Q
24 .;Skip inactive reminders
25 .S DATA=$G(^PXD(811.9,RIEN,0)) Q:DATA="" Q:$P(DATA,U,6)
26 .S NAME=$P(DATA,U) I NAME="" S NAME="Unknown"
27 .;or printname
28 .S PNAME=$P(DATA,U,3)
29 .S TEMP(SEQ)=RIEN_U_NAME_U_PNAME
30 ;
31 ;Re-save reminders in output array for display
32 ;type^reminder ien^name
33 ;
34 S SEQ=""
35 F S SEQ=$O(TEMP(SEQ)) Q:SEQ="" D
36 .S IC=IC+1,ORY(IC)="R"_U_TEMP(SEQ)
37 ;
38 ;Sort Sub-Categories for this category into display order
39 S SUB=0 K TEMP
40 F S SUB=$O(^PXRMD(811.7,CIEN,10,SUB)) Q:SUB="" D
41 .S DATA=$G(^PXRMD(811.7,CIEN,10,SUB,0)) Q:DATA=""
42 .S IEN=$P(DATA,U) Q:'IEN
43 .S SEQ=$P(DATA,U,2),TEMP(SEQ)=IEN
44 ;
45 ;Save sub categories
46 S SEQ=""
47 F S SEQ=$O(TEMP(SEQ)) Q:SEQ="" D
48 .S SUB=TEMP(SEQ) Q:'SUB
49 .S NAME=$P($G(^PXRMD(811.7,SUB,0)),U) Q:NAME=""
50 .S IC=IC+1,ORY(IC)="C"_U_SUB_U_NAME
51 Q
52 ;
53DIALOG(ORY,ORDLG,DFN) ;Load dialog
54 ;
55 ; Input parameter ORDLG - dialog ien [#801.41]
56 ;
57 I 'ORDLG S ORY(1)="-1^dialog ien not specified" Q
58 ;
59 ;Check if a reminder dialog and enabled
60 N DATA
61 S DATA=$G(^PXRMD(801.41,ORDLG,0))
62 ;
63 I $P(DATA,U,4)'="R" S ORY(1)="-1^reminder dialog invalid" Q
64 ;
65 I $P(DATA,U,3) S ORY(1)="-1^reminder dialog disabled" Q
66 ;
67 ;Load dialog lines into local array
68 D LOAD^PXRMDLL(ORDLG,$G(DFN))
69 Q
70 ;
71EDITPAR(PAR) ;Edit CPRS GUI Version 15 parameters
72 ;
73 ;This is an entry action in the PXRM CPRS CONFIGURATION menu options
74 ;
75 ;Check if Patch 85 has been installed
76 I '$$FIND1^DIC(8989.51,"","AMX",PAR) D Q
77 .W !!,"This option requires CPRS GUI Version 15",*7 H 1
78 ;
79 ;Edit Parameter Definition
80 D EDITPAR^XPAREDIT(PAR)
81 Q
82 ;
83SEL(ORY) ;Selectable reminders and categories
84 N CIEN,CNAM,CNT,DATA,RCLASS,RNAM,RPNAM,RIEN,TYPE,USAGE
85 ;
86 ;Reminders in print name order
87 S TYPE="R",RPNAM="",CNT=0
88 F S RPNAM=$O(^PXD(811.9,"D",RPNAM)) Q:RPNAM="" D
89 .S RIEN=0
90 .F S RIEN=$O(^PXD(811.9,"D",RPNAM,RIEN)) Q:'RIEN D
91 ..;Include only CPRS reminders
92 ..S USAGE=$P($G(^PXD(811.9,RIEN,100)),U,4) I USAGE'["C",USAGE'["*" Q
93 ..;Skip inactive reminders
94 ..S DATA=$G(^PXD(811.9,RIEN,0)) Q:DATA="" Q:$P(DATA,U,6)
95 ..S RNAM=$P(DATA,U),RCLASS=$P($G(^PXD(811.9,RIEN,100)),U)
96 ..S CNT=CNT+1,ORY(CNT)=TYPE_U_RIEN_U_RPNAM_U_RNAM_U_RCLASS
97 ;
98 ;Categories in name order
99 S TYPE="C",CNAM=""
100 F S CNAM=$O(^PXRMD(811.7,"B",CNAM)) Q:CNAM="" D
101 .S CIEN=$O(^PXRMD(811.7,"B",CNAM,"")) Q:'CIEN
102 .S CNT=CNT+1,ORY(CNT)=TYPE_U_CIEN_U_CNAM
103 Q
Note: See TracBrowser for help on using the repository browser.