Changeset 636 for FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMPDRS.m
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMPDRS.m
r628 r636 1 PXRMPDRS ;SLC/PKR - Patient List Demographic Report data selection. ;0 3/22/20072 ;;2.0;CLINICAL REMINDERS;**4 ,6**;Feb 04, 2005;Build 1231 PXRMPDRS ;SLC/PKR - Patient List Demographic Report data selection. ;07/18/2006 2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21 3 3 ; 4 ADDSEL( DATA,SUB) ;Let the user select the address information they want.4 ADDSEL(ADDDATA) ;Let the user select the address information they want. 5 5 N ADDLIST,LIST 6 S ADDLIST("A",1)=" 1 - CURRENT ADDRESS", DATA(SUB,1,1)="STREET ADDRESS #1"_U_17 S DATA(SUB,1,2)="STREET ADDRESS #2"_U_1,DATA(SUB,1,3)="STREET ADDRESS #3"_U_18 S DATA(SUB,1,4)="CITY"_U_1,DATA(SUB,1,5)="STATE"_U_2,DATA(SUB,1,6)="ZIP"_U_19 S DATA(SUB,1,7)="COUNTY"_U_210 S ADDLIST("A",2)=" 2 - PHONE NUMBER", DATA(SUB,2,8)="PHONE NUMBER"_U_16 S ADDLIST("A",1)=" 1 - CURRENT ADDRESS",ADDDATA(1,1)="STREET ADDRESS #1"_U_1 7 S ADDDATA(1,2)="STREET ADDRESS #2"_U_1,ADDDATA(1,3)="STREET ADDRESS #3"_U_1 8 S ADDDATA(1,4)="CITY"_U_1,ADDDATA(1,5)="STATE"_U_2,ADDDATA(1,6)="ZIP"_U_1 9 S ADDDATA(1,7)="COUNTY"_U_2 10 S ADDLIST("A",2)=" 2 - PHONE NUMBER",ADDDATA(2,8)="PHONE NUMBER"_U_1 11 11 S ADDLIST("A")="Enter your selection(s)" 12 12 S ADDLIST("?")="^D HELP^PXRMPDRS" … … 14 14 S LIST=$$SEL^PXRMPDRS(.ADDLIST,2) 15 15 I $D(DTOUT)!$D(DUOUT) Q 16 S DATA(SUB)=LIST17 S DATA(SUB,"LEN")=$L(LIST,",")-116 S ADDDATA=LIST 17 S ADDDATA("LEN")=$L(LIST,",")-1 18 18 Q 19 19 ; … … 44 44 Q 45 45 ; 46 APPSEL( DATA,SUB) ;Let the user select the appointment information they want.46 APPSEL(APPDATA) ;Let the user select the appointment information they want. 47 47 ;The first subscript of APPDATA is the selection number and the 48 48 ;the second subscript is the subscript where the data is returned … … 50 50 ;second piece is the piece of VAPA this is displayed. 51 51 N APPLIST,LIST,MAX 52 S APPLIST("A",1)=" 1 - APPOINTMENT DATE", DATA(SUB,1,1)="APPOINTMENT DATE"_U_153 S APPLIST("A",2)=" 2 - CLINIC", DATA(SUB,2,2)="CLINIC"_U_252 S APPLIST("A",1)=" 1 - APPOINTMENT DATE",APPDATA(1,1)="APPOINTMENT DATE"_U_1 53 S APPLIST("A",2)=" 2 - CLINIC",APPDATA(2,2)="CLINIC"_U_2 54 54 S APPLIST("A")="Enter your selection(s)" 55 55 S APPLIST("?")="^D HELP^PXRMPDRS" … … 57 57 S LIST=$$SEL^PXRMPDRS(.APPLIST,2) 58 58 I $D(DTOUT)!$D(DUOUT) Q 59 S DATA(SUB)=LIST60 S DATA(SUB,"LEN")=$L(LIST,",")-161 I DATA(SUB,"LEN")=0 Q62 S DATA(SUB,"MAX")=$$ASKNUM^PXRMEUT("Maximum number of appointments to display",1,25)59 S APPDATA=LIST 60 S APPDATA("LEN")=$L(LIST,",")-1 61 I APPDATA("LEN")=0 Q 62 S APPDATA("MAX")=$$ASKNUM^PXRMEUT("Maximum number of appointments to display",1,25) 63 63 Q 64 64 ; 65 DATASEL(LISTIEN, DATA,SUB) ; Build a list of data that is availble for65 DATASEL(LISTIEN,FINDDATA) ; Build a list of data that is availble for 66 66 ;this patient list and let the user select what they want. 67 67 N IND,DATALIST,DTYPE … … 69 69 F S DTYPE=$O(^PXRMXP(810.5,LISTIEN,35,"B",DTYPE)) Q:DTYPE="" D 70 70 . S IND=IND+1,DATALIST("A",IND)=" "_IND_" - "_DTYPE 71 . S DATA(SUB,IND,IND)=DTYPE71 . S FINDDATA(IND,IND)=DTYPE 72 72 ;If there is no data quit. 73 I IND=0 S DATA(SUB,"LEN")=0 Q73 I IND=0 S FINDDATA("LEN")=0 Q 74 74 S DATALIST("A")="Enter your selections(s)" 75 75 S DATALIST("?")="^D HELP^PXRMPDRS" … … 77 77 S LIST=$$SEL^PXRMPDRS(.DATALIST,IND) 78 78 I $D(DTOUT)!$D(DUOUT) Q 79 S DATA(SUB)=LIST80 S DATA(SUB,"LEN")=$L(LIST,",")-179 S FINDDATA=LIST 80 S FINDDATA("LEN")=$L(LIST,",")-1 81 81 Q 82 82 ; 83 DEMSEL(D ATA,SUB) ;Let the user select the demographic information they want.84 ;The first subscript of D ATA is the selection number and the83 DEMSEL(DEMDATA) ;Let the user select the demographic information they want. 84 ;The first subscript of DEMDATA is the selection number and the 85 85 ;the second subscript is the subscript where the data is returned 86 86 ;in VADM. The first piece of DEMDATA is the name of the data and the 87 87 ;second piece is the piece of VADM this is displayed. 88 88 N DEMLIST,DTOUT,DUOUT,IND,ITEM,JND,KND,LIST,TEMP 89 S DEMLIST("A",1)=" 1 - SSN",D ATA(SUB,1,2)="SSN"_U_290 S DEMLIST("A",2)=" 2 - DATE OF BIRTH",D ATA(SUB,2,3)="DOB"_U_291 S DEMLIST("A",3)=" 3 - AGE",D ATA(SUB,3,4)="AGE"_U_192 S DEMLIST("A",4)=" 4 - SEX",D ATA(SUB,4,5)="SEX"_U_293 S DEMLIST("A",5)=" 5 - DATE OF DEATH",D ATA(SUB,5,6)="DOD"_U_294 S DEMLIST("A",6)=" 6 - REMARKS",D ATA(SUB,6,7)="REMARKS"_U_195 S DEMLIST("A",7)=" 7 - HISTORIC RACE",D ATA(SUB,7,8)="HISTORIC RACE"_U_296 S DEMLIST("A",8)=" 8 - RELIGION",D ATA(SUB,8,9)="RELIGION"_U_297 S DEMLIST("A",9)=" 9 - MARITAL STATUS",D ATA(SUB,9,10)="MARTIAL STATUS"_U_298 S DEMLIST("A",10)="10 - ETHNICITY",D ATA(SUB,10,11)="ETHNICITY"_U_299 S DEMLIST("A",11)="11 - RACE",D ATA(SUB,11,12)="RACE"_U_289 S DEMLIST("A",1)=" 1 - SSN",DEMDATA(1,2)="SSN"_U_2 90 S DEMLIST("A",2)=" 2 - DATE OF BIRTH",DEMDATA(2,3)="DOB"_U_2 91 S DEMLIST("A",3)=" 3 - AGE",DEMDATA(3,4)="AGE"_U_1 92 S DEMLIST("A",4)=" 4 - SEX",DEMDATA(4,5)="SEX"_U_2 93 S DEMLIST("A",5)=" 5 - DATE OF DEATH",DEMDATA(5,6)="DOD"_U_2 94 S DEMLIST("A",6)=" 6 - REMARKS",DEMDATA(6,7)="REMARKS"_U_1 95 S DEMLIST("A",7)=" 7 - HISTORIC RACE",DEMDATA(7,8)="HISTORIC RACE"_U_2 96 S DEMLIST("A",8)=" 8 - RELIGION",DEMDATA(8,9)="RELIGION"_U_2 97 S DEMLIST("A",9)=" 9 - MARITAL STATUS",DEMDATA(9,10)="MARTIAL STATUS"_U_2 98 S DEMLIST("A",10)="10 - ETHNICITY",DEMDATA(10,11)="ETHNICITY"_U_2 99 S DEMLIST("A",11)="11 - RACE",DEMDATA(11,12)="RACE"_U_2 100 100 S DEMLIST("A")="Enter your selection(s)" 101 101 S DEMLIST("?")="^D HELP^PXRMPDRS" … … 103 103 S LIST=$$SEL^PXRMPDRS(.DEMLIST,11) 104 104 I $D(DTOUT)!$D(DUOUT) Q 105 S D ATA(SUB)=LIST106 S D ATA(SUB,"LEN")=$L(LIST,",")-1107 F IND=1:1:D ATA(SUB,"LEN") D105 S DEMDATA=LIST 106 S DEMDATA("LEN")=$L(LIST,",")-1 107 F IND=1:1:DEMDATA("LEN") D 108 108 . S JND=$P(LIST,",",IND) 109 . S KND=$O(D ATA(SUB,JND,""))110 . S TEMP=$P(D ATA(SUB,JND,KND),U,1)109 . S KND=$O(DEMDATA(JND,"")) 110 . S TEMP=$P(DEMDATA(JND,KND),U,1) 111 111 . I TEMP="SSN" D 112 112 .. N FULLSSN 113 113 .. D SSN^PXRMXSD(.FULLSSN) 114 .. S D ATA(SUB,"FULLSSN")=$S($G(FULLSSN)="Y":1,1:0)115 . I $D(DTOUT)!$D(DUOUT) S IND=D ATA(SUB,"LEN")+1 Q116 . I TEMP="ETHNICITY" S $P(D ATA(SUB,10,11),U,3)=$$ASKNUM^PXRMEUT("Maximum number of ethnicity entries to display",1,10)117 . I TEMP="RACE" S $P(D ATA(SUB,11,12),U,3)=$$ASKNUM^PXRMEUT("Maximum number of race entries to display",1,10)114 .. S DEMDATA("FULLSSN")=$S($G(FULLSSN)="Y":1,1:0) 115 . I $D(DTOUT)!$D(DUOUT) S IND=DEMDATA("LEN")+1 Q 116 . I TEMP="ETHNICITY" S $P(DEMDATA(10,11),U,3)=$$ASKNUM^PXRMEUT("Maximum number of ethnicity entries to display",1,10) 117 . I TEMP="RACE" S $P(DEMDATA(11,12),U,3)=$$ASKNUM^PXRMEUT("Maximum number of race entries to display",1,10) 118 118 I $D(DTOUT)!$D(DUOUT) K DTOUT,DUOUT G DSEL 119 119 Q 120 120 ; 121 ELIGSEL( DATA,SUB) ;Let the user select the eligibility data they want.121 ELIGSEL(ELIGDATA) ;Let the user select the eligibility data they want. 122 122 ;The first subscript of ELIGDATA is the selection number and the 123 123 ;the second subscript is the subscript where the data is returned … … 125 125 ;second piece is the piece of VAEL this is displayed. 126 126 N ELIGLIST,ITEM,LIST 127 S ELIGLIST("A",1)=" 1 - PRIMARY ELGIBILITY CODE", DATA(SUB,1,1)="PRIMARY ELGIBILITY CODE"_U_2128 S ELIGLIST("A",2)=" 2 - PERIOD OF SERVICE", DATA(SUB,2,2)="PERIOD OF SERVICE"_U_2129 S ELIGLIST("A",3)=" 3 - % SERVICE CONNECTED", DATA(SUB,3,3)="% SERVICE CONNECTED"_U_2130 S ELIGLIST("A",4)=" 4 - VETERAN", DATA(SUB,4,4)="VETERAN"_U_1131 S ELIGLIST("A",5)=" 5 - TYPE", DATA(SUB,5,6)="TYPE"_U_2132 S ELIGLIST("A",6)=" 6 - ELIGIBILITY STATUS", DATA(SUB,6,8)="ELIGIBILITY STATUS"_U_2133 S ELIGLIST("A",7)=" 7 - CURRENT MEANS TEST", DATA(SUB,7,9)="CURRENT MEANS TEST"_U_2127 S ELIGLIST("A",1)=" 1 - PRIMARY ELGIBILITY CODE",ELIGDATA(1,1)="PRIMARY ELGIBILITY CODE"_U_2 128 S ELIGLIST("A",2)=" 2 - PERIOD OF SERVICE",ELIGDATA(2,2)="PERIOD OF SERVICE"_U_2 129 S ELIGLIST("A",3)=" 3 - % SERVICE CONNECTED",ELIGDATA(3,3)="% SERVICE CONNECTED"_U_2 130 S ELIGLIST("A",4)=" 4 - VETERAN",ELIGDATA(4,4)="VETERAN"_U_1 131 S ELIGLIST("A",5)=" 5 - TYPE",ELIGDATA(5,6)="TYPE"_U_2 132 S ELIGLIST("A",6)=" 6 - ELIGIBILITY STATUS",ELIGDATA(6,8)="ELIGIBILITY STATUS"_U_2 133 S ELIGLIST("A",7)=" 7 - CURRENT MEANS TEST",ELIGDATA(7,9)="CURRENT MEANS TEST"_U_2 134 134 S ELIGLIST("A")="Enter your selection(s)" 135 135 S ELIGLIST("?")="^D HELP^PXRMPDRS" … … 137 137 S LIST=$$SEL^PXRMPDRS(.ELIGLIST,7) 138 138 I $D(DTOUT)!$D(DUOUT) Q 139 S DATA(SUB)=LIST140 S DATA(SUB,"LEN")=$L(LIST,",")-1139 S ELIGDATA=LIST 140 S ELIGDATA("LEN")=$L(LIST,",")-1 141 141 Q 142 142 ; … … 147 147 Q 148 148 ; 149 INPSEL( DATA,SUB) ;Let the user select the inpatient information they want.149 INPSEL(INPDATA) ;Let the user select the inpatient information they want. 150 150 ;The first subscript of INPDATA is the selection number and the 151 151 ;the second subscript is the subscript where the data is returned … … 153 153 ;second piece is the piece of VAIN this is displayed. 154 154 N INPLIST,ITEM,LIST 155 S INPLIST("A",1)=" 1 - WARD LOCATION", DATA(SUB,1,4)="WARD"_U_2156 S INPLIST("A",2)=" 2 - ROOM-BED", DATA(SUB,2,5)="ROOM-BED"_U_1157 S INPLIST("A",3)=" 3 - ADMISSION DATE/TIME", DATA(SUB,3,7)="ADMISSION DATE/TIME"_U_2158 S INPLIST("A",4)=" 4 - ATTENDING PHYSICIAN", DATA(SUB,4,11)="ATTENDING"_U_2155 S INPLIST("A",1)=" 1 - WARD LOCATION",INPDATA(1,4)="WARD"_U_2 156 S INPLIST("A",2)=" 2 - ROOM-BED",INPDATA(2,5)="ROOM-BED"_U_1 157 S INPLIST("A",3)=" 3 - ADMISSION DATE/TIME",INPDATA(3,7)="ADMISSION DATE/TIME"_U_2 158 S INPLIST("A",4)=" 4 - ATTENDING PHYSICIAN",INPDATA(4,11)="ATTENDING"_U_2 159 159 S INPLIST("A")="Enter your selection(s)" 160 160 S INPLIST("?")="^D HELP^PXRMPDRS" … … 162 162 S LIST=$$SEL^PXRMPDRS(.INPLIST,5) 163 163 I $D(DTOUT)!$D(DUOUT) Q 164 S DATA(SUB)=LIST165 S DATA(SUB,"LEN")=$L(LIST,",")-1164 S INPDATA=LIST 165 S INPDATA("LEN")=$L(LIST,",")-1 166 166 Q 167 167 ; 168 REMSEL(PLIEN, DATA,SUB) ;If the list was generated from a reminder report168 REMSEL(PLIEN,REMDATA) ;If the list was generated from a reminder report 169 169 ;let the user select the reminder data they want. 170 I '$P(^PXRMXP(810.5,PLIEN,0),U,9) S DATA(SUB,"LEN")=0 Q170 I '$P(^PXRMXP(810.5,PLIEN,0),U,9) S REMDATA("LEN")=0 Q 171 171 N IEN,IND,REMLIST,RNAME 172 172 S (IEN,IND)=0 … … 175 175 . I RNAME="" S RNAME=$P(^PXD(811.9,IEN,0),U,1) 176 176 . S IND=IND+1 177 . S DATA(SUB,"RNAME",IND)=RNAME178 . S DATA(SUB,"IEN",IND)=IEN177 . S REMDATA("RNAME",IND)=RNAME 178 . S REMDATA("IEN",IND)=IEN 179 179 . S REMLIST("A",IND)=" "_IND_" - "_RNAME 180 180 S REMLIST("A")="Enter your selection(s)" … … 183 183 S LIST=$$SEL^PXRMPDRS(.REMLIST,IND) 184 184 I $D(DTOUT)!$D(DUOUT) Q 185 S DATA(SUB)=LIST186 S DATA(SUB,"LEN")=$L(LIST,",")-1185 S REMDATA=LIST 186 S REMDATA("LEN")=$L(LIST,",")-1 187 187 Q 188 188 ;
Note:
See TracChangeset
for help on using the changeset viewer.