Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDECINI1

SDECINI1.m

Go to the documentation of this file.
SDECINI1 ;ALB/SAT - VISTA SCHEDULING RPCS ;JAN 15, 2016
 ;;5.3;Scheduling;**627**;Aug 13, 1993;Build 249
 ;
 Q
 ;
RESAB  ;populate SDEC ACCESS BLOCK file from existing AVAILABILITY in file 44
 Q
 ;
SDWLCL  ;populate SD WL CLINIC LOCATION file with clinics from file 44
 N SDCL,SDCLID,SDCLN,SDCLRD,SDDATA,SDFDA,SDFIELDS,SDIEN,SDMSG,SDW
 W !!,"Updating SD WL CLINIC LOCATION file 409.32 with clinics from file 44..."
 S SDCL=0 F  S SDCL=$O(^SC(SDCL)) Q:SDCL'>0  D
 .K SDDATA,SDMSG
 .; .01 name; 2 type; 1912 len of appt; 2508 no show let; 2509 pre-appt let; 2510 clinic can let;
 .;S SDFIELDS=".01;2;3;1912;2502.3;2505;2506;2508;2509;2510"
 .S SDFIELDS=".01;2;3;1912;2505;2506;2508;2509;2510"
 .D GETS^DIQ(44,SDCL_",",SDFIELDS,"IE","SDDATA","SDMSG")
 .Q:SDDATA(44,SDCL_",",2,"I")'="C"
 .;Q:SDDATA(44,SDCL_",",2502.3,"I")=1
 .S SDCLN=SDDATA(44,SDCL_",",.01,"E")   ;clinic name
 .;look for existing to allow this post-init to be re-entrant
 .I $O(^SDWL(409.32,"B",SDCL,0)) D SDWLCL1(SDCL,.SDDATA) Q  ;W !,"SDWLCL: Clinic "_SDCLN_" is already defined in SD WL CLINIC LOCATION." Q
 .S SDCLID=SDDATA(44,SDCL_",",2505,"I")
 .S SDCLRD=SDDATA(44,SDCL_",",2506,"I")
 .Q:$$INACTIVE^SDECUTL2(SDCL,$P($$NOW^XLFDT,".",1),9991231,SDCLID,SDCLRD)
 .I SDDATA(44,SDCL_",",3,"I")="" D  Q
 ..W !,"SDWLCL: Clinic "_SDCLN_" does not have an INSTITUTION defined in file 44."
 ..W !,"        Unable to store "_SDCLN_" in the SD WL CLINIC LOCATION file."
 .S SDW="+1"
 .K SDFDA,SDIEN,SDMSG
 .S SDFDA=$NA(SDFDA(409.32,SDW_","))
 .S @SDFDA@(.01)=SDCL
 .S @SDFDA@(.02)=SDDATA(44,SDCL_",",3,"I")
 .I SDCLID="" S @SDFDA@(1)=$P($$NOW^XLFDT,".",1)
 .I SDCLID="" S @SDFDA@(2)=DUZ
 .I SDCLID'="" S @SDFDA@(3)=SDDATA(44,SDCL_",",2505,"I")
 .I SDCLID'="" S @SDFDA@(4)=DUZ  ;SDDATA(44,SDCL_",",2506,"I")
 .D UPDATE^DIE("","SDFDA","SDIEN","SDMSG")
 .I $D(SDMSG) W !,"SDWLCL: Unable to store clinic "_SDCL_" in SD WL CLINIC LOCATION." Q
 Q
SDWLCL1(SDCL,SDDATA)  ;
 N SDAD,SDCLI,SDCLAD,SDCLID,SDCLRD,SDFDA,SDI,SDID
 S SDI="" F  S SDI=$O(^SDWL(409.32,"B",SDCL,SDI)) Q:SDI'>0  D
 .S SDAD=$$GET1^DIQ(409.32,SDI_",",1,"I")
 .S SDID=$$GET1^DIQ(409.32,SDI_",",3,"I")
 .S SDCLAD=$P($$NOW^XLFDT,".",1)
 .S SDCLID=SDDATA(44,SDCL_",",2505,"I")
 .S SDCLRD=SDDATA(44,SDCL_",",2506,"I")
 .S SDCLI=$$INACTIVE^SDECUTL2(SDCL,SDCLAD,9991231,SDCLID,SDCLRD)
 .Q:SDCLI=0  ;leave the settings in 409.32 as they are if clinic is active
 .;I SDCLI=0 D  ;clinic is active
 .;.I SDID="",((SDAD="")!(SDAD>SDCLAD)) D
 .;..K SDFDA
 .;..S SDFDA=$NA(SDFDA(409.32,SDI_","))
 .;..S @SDFDA@(1)=SDCLAD
 .;..S @SDFDA@(2)=DUZ
 .;..D UPDATE^DIE("","SDFDA")
 .I SDCLI=1 D  ;clinic is inactive
 ..I SDID'="",SDID<=SDCLAD Q   ;409.32 is already inactive
 ..K SDFDA
 ..S SDFDA=$NA(SDFDA(409.32,SDI_","))
 ..S @SDFDA@(3)=SDCLAD
 ..S @SDFDA@(4)=DUZ
 ..D UPDATE^DIE("","SDFDA")
 Q
 ;
INDEX ;initialize new xrefs
 N CNT,DA,DIK,GMR,SDCL,SDWL,Y
 ;
 ;44
 ;AVADPR in file 44
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'AVADPR' and 'AG' indexes for HOSPITAL LOCATION file 44"
 W !,Y
 S SDCL=0 F  S SDCL=$O(^SC(SDCL)) Q:SDCL'>0  D AVADPR44(SDCL)
 D AG44()  ;AG
 ;
 ;403.5
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'AC' index for RECALL REMINDERS file 403.5"
 W !,Y
 D AC4035()   ;AC
 ;
 ;403.56
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'AC' index for RECALL REMINDERS REMOVED file 403.56"
 W !,Y
 D AC40356()  ;AC
 ;
 ;409.3
 ;E in file 409.3
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'E','AC','AD', and 'AE' indexes for SD WAIT LIST file 409.3"
 W !,Y
 N DA,DIK,SDCL
 D E4093()      ;E
 D AE4093()     ;AE
 D AC4093()     ;AC
 D AD4093()     ;AD
 ;
 ;409.831
 D AC409831()
 ;
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'AD' index for SDEC RESOURCE USER file 409.833"
 W !,Y
 D AD833()
 ;
 ;409.85
 S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 W !!,"Build new 'E' and 'AC' index for SDEC APPT REQUEST file 409.85"
 W !,Y
 D E40985()
 ;
 ;123  this will be done in GMRC*3.0*83
 ;S Y=$$NOW^XLFDT,Y=$$FMTE^XLFDT(Y)
 ;W !!,"Build new 'AG' index for REQUEST/CONSULTATION file 123"
 ;W !,Y
 ;D I123()
 Q
 ;
AC409831() ;create and build NEW style AC for all SDEC RESOURCE entries in file 44
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=409.831
 S GMRCXR("NAME")="AC"
 S GMRCXR("TYPE")="MU"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index of RESOURCE TYPE"
 S GMRCXR("DESCR",1)="This cross-reference is built from both pieces of the"
 S GMRCXR("DESCR",2)="RESOURCE TYPE variable pointer field to speed up the"
 S GMRCXR("DESCR",3)="sorting of resources when given a specific source and ID."
 S GMRCXR("DESCR",4)="The sources could be HOSPITAL LOCATION, NEW PERSON, or SDEC"
 S GMRCXR("DESCR",5)="ADDITIONAL RESOURCE."
 S GMRCXR("SET")="D RTS^SDEC03(DA,X) Q"
 S GMRCXR("KILL")="D RTK^SDEC03(DA,X) Q"
 S GMRCXR("WHOLE KILL")="K ^SDEC(409.831,""AC"")"
 S GMRCXR("VAL",1)=.012
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",1,"TYPE")="F"
 S GMRCXR("VAL",2)=.012
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 S GMRCXR("VAL",2,"TYPE")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
AG44() ;create and build NEW style AG for all HOSPITAL LOCATION entries in file 44
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=44
 S GMRCXR("NAME")="AG"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by TYPE and NAME."
 S GMRCXR("DESCR",1)="This cross reference is used to sort by TYPE and NAME."
 S GMRCXR("VAL",1)=2
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=.01
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
AVADPR44(SDCL) ;rebuild AVADPR for given Hospital Location in file 44
 N DA,DIK,SDI
 S SDI=0 F  S SDI=$O(^SC(SDCL,"PR",SDI)) Q:SDI'>0  D
 .S DIK="^SC("_SDCL_",""PR"","
 .S DA(1)=SDCL
 .S DA=SDI
 .S DIK(1)=".01^AVADPR"
 .D EN1^DIK
 Q
 ;
AC4035() ;create and build NEW style AC for all RECALL REMINDERS entries in file 403.5
 N GMRCXR,GMRCRES,GMRCOUT
 K GMRCXR
 S GMRCXR("FILE")=403.5
 S GMRCXR("INDEX")="AC"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 S GMRCXR("FILE")=403.5
 S GMRCXR("NAME")="AC"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by DATE/TIME RECALL ADDED and USER WHO ENTERED RECALL"
 S GMRCXR("DESCR",1)="This cross reference is used to sort by DATE/TIME RECALL ADDED"
 S GMRCXR("DESCR",2)="and USER WHO ENTERED RECALL."
 S GMRCXR("VAL",1)=7.5
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=7
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
AC40356() ;create and build NEW style AC for all RECALL REMINDERS REMOVED entries in file 403.56
 N GMRCXR,GMRCRES,GMRCOUT
 K GMRCXR
 S GMRCXR("FILE")=403.56
 S GMRCXR("INDEX")="AC"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 S GMRCXR("FILE")=403.56
 S GMRCXR("NAME")="AC"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by DATE/TIME RECALL ADDED and USER WHO ENTERED RECALL"
 S GMRCXR("DESCR",1)="This cross reference is used to sort by DATE/TIME RECALL ADDED"
 S GMRCXR("DESCR",2)="and USER WHO ENTERED RECALL."
 S GMRCXR("VAL",1)=7.5
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=7
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
E4093(SDWL) ;rebuild E for given SD WAIT LIST in file 409.3
 N DA,DIK
 S DIK="^SDWL(409.3,"
 ;S DA(1)=SDWL
 S DIK(1)=23
 D ENALL^DIK
 Q
AF4093() ;create and build NEW style AF for all SD WAIT LIST entries in file 409.3
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=409.3
 S GMRCXR("NAME")="AF"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 ;S GMRCXR("ROOT TYPE")="W"
 ;S GMRCXR("ROOT FILE")=123.02
 S GMRCXR("SHORT DESCR")="Index by CURRENT STATUS and ORIGINATING DATE."
 S GMRCXR("DESCR",1)="This xref is used to speed up the lookup of open or closed"
 S GMRCXR("DESCR",2)="wait list entries for a given time range.."
 S GMRCXR("VAL",1)=23
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=1
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
AE4093(SDWL) ;rebuild AE for given SD WAIT LIST in file 409.3
 N DA,DIK
 S DIK="^SDWL(409.3,"
 ;S DA(1)=SDWL
 S DIK(1)=8.5
 D ENALL^DIK
 Q
AC4093() ;create and build NEW style AC for all SD WAIT LIST entries in file 409.3
 N GMRCXR
 K GMRCXR
 S GMRCXR("FILE")=409.3
 S GMRCXR("INDEX")="AC"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=409.3
 S GMRCXR("NAME")="AC"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by ORIGINATING DATE and ORIGINATING USER"
 S GMRCXR("DESCR",1)="This cross reference is used to sort by ORIGINATING DATE and"
 S GMRCXR("DESCR",2)="ORIGINATING USER."
 S GMRCXR("VAL",1)=9.5
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=9
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
AD4093() ;create and build NEW style AD for all SD WAIT LIST entries in file 409.3
 N GMRCXR,GMRCRES,GMRCOUT
 N GMRCXR
 K GMRCXR
 S GMRCXR("FILE")=409.3
 S GMRCXR("INDEX")="AD"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 S GMRCXR("FILE")=409.3
 S GMRCXR("NAME")="AD"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by PATIENT and WL SPECIFIC HOSPITAL LOCATION"
 S GMRCXR("DESCR",1)="This cross reference is used to sort by PATIENT and"
 S GMRCXR("DESCR",2)="WL SPECIFIC HOSPITAL LOCATION."
 S GMRCXR("VAL",1)=.01
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=8.5
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
E40985() ;create NEW style E and AC for SDEC APPT REQUEST file 409.85
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=409.85
 S GMRCXR("NAME")="E"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by CURRENT STATUS and CREATE DATE."
 S GMRCXR("DESCR",1)="This cross reference is used to sort by CURRENT STATUS and CREATE DATE."
 S GMRCXR("VAL",1)=23
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=1
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 ;AC
 K GMRCXR
 S GMRCXR("FILE")=409.85
 S GMRCXR("INDEX")="AC"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 S GMRCXR("FILE")=409.85
 S GMRCXR("NAME")="AC"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by CREATE DATE and ORIGINATING USER"
 S GMRCXR("DESCR",1)="This cross reference is used to sort by CREATE DATE and"
 S GMRCXR("DESCR",2)="ORIGINATING USER."
 S GMRCXR("VAL",1)=9.5
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=9
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
AD833() ;create and build NEW style AD for all SDEC RESOURCE USER entries in file 409.833
 N GMRCXR,GMRCRES,GMRCOUT
 K GMRCXR
 S GMRCXR("FILE")=409.833
 S GMRCXR("INDEX")="AD"
 S GMRCXR("FLAGS")="K"
 D DELIXN^DDMOD(GMRCXR("FILE"),GMRCXR("INDEX"),GMRCXR("FLAGS"))
 K GMRCXR
 S GMRCXR("FILE")=409.833
 S GMRCXR("NAME")="AD"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 ;S GMRCXR("ROOT TYPE")="W"
 ;S GMRCXR("ROOT FILE")=123.02
 S GMRCXR("SHORT DESCR")="Index by RESOURCENAME and USERNAME."
 S GMRCXR("DESCR",1)="This cross reference is used to sort by RESOURCENAME and USERNAME."
 S GMRCXR("VAL",1)=.01
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=.02
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q
 ;
I123() ;create and build NEW style AG for all REQUEST/CONSULTATION entries in file 123
 N GMRCXR,GMRCRES,GMRCOUT
 S GMRCXR("FILE")=123
 S GMRCXR("NAME")="AG"
 S GMRCXR("TYPE")="R"
 S GMRCXR("USE")="S"
 S GMRCXR("EXECUTION")="R"
 S GMRCXR("ACTIVITY")="IR"
 S GMRCXR("SHORT DESCR")="Index by DATE/TIME OF ACTION ENTRY and WHO ENTERED ACTIVITY."
 S GMRCXR("ROOT TYPE")="W"
 S GMRCXR("ROOT FILE")=123.02
 S GMRCXR("DESCR",1)="This cross reference is used to sort by DATE/TIME OF ACTION ENTRY and"
 S GMRCXR("DESCR",2)="WHO ENTERED ACTIVITY."
 S GMRCXR("VAL",1)=.01
 S GMRCXR("VAL",1,"SUBSCRIPT")=1
 S GMRCXR("VAL",1,"LENGTH")=""
 S GMRCXR("VAL",1,"COLLATION")="F"
 S GMRCXR("VAL",2)=4
 S GMRCXR("VAL",2,"SUBSCRIPT")=2
 S GMRCXR("VAL",2,"LENGTH")=""
 S GMRCXR("VAL",2,"COLLATION")="F"
 D CREIXN^DDMOD(.GMRCXR,"S",.GMRCRES,"GMRCOUT")
 Q