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

FSCXPOST.m

Go to the documentation of this file.
FSCXPOST ;SLC/STAFF-NOIS Xrefs Client ;9/6/98  22:21
 ;;1.1;NOIS;;Sep 06, 1998
 ;;
ALL ; from FSCTASKA
 D SITE,OFFICE,MOD,PACK,LTYPE,PACKG,TASK,SYSTEM,FIELD
 Q
 ;
SITE ;
 N ABBREV,CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS LOCATION"
 K ^FSC("SITE","ACL")
 S IEN=0 F  S IEN=$O(^FSC("SITE",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("SITE",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U)),ABBREV=$P(ZERO,U,3)
 .D SETUP("^FSC(""SITE"",",IEN,NUM,NAME)
 .I $L(ABBREV) S NUM=NUM+1 D SETUP("^FSC(""SITE"",",IEN,NUM,ABBREV_"  - "_NAME)
 .S CNT=0 F  S CNT=$O(^FSC("SITE",IEN,2,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""SITE"",",IEN,NUM,VALUE)
 .S ^FSC("SITE",IEN,99,0)="^7105.199^"_NUM_U_NUM
 Q
 ;
OFFICE ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS OFFICE"
 K ^FSC("ISC","ACL")
 S IEN=0 F  S IEN=$O(^FSC("ISC",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("ISC",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""ISC"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("ISC",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""ISC"",",IEN,NUM,VALUE)
 .S ^FSC("ISC",IEN,99,0)="^7105.399^"_NUM_U_NUM
 Q
 ;
MOD ;
 N CNT,IEN,NAME,NAMECONV,NAMESP,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS MODULE/VERSION"
 K ^FSC("MOD","ACL")
 S IEN=0 F  S IEN=$O(^FSC("MOD",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("MOD",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U)),NAMECONV=$P(ZERO,U,7),NAMESP=$P(ZERO,U,4)
 .I $P(ZERO,U,3)=1 S NAME=$TR(NAME,"/"," ")
 .I $P(ZERO,U,3)=2 S NAME=$TR(NAME,"/","+")
 .I $P(ZERO,U,3)=3 S NAME=$TR(NAME,"/","-")
 .D SETUP("^FSC(""MOD"",",IEN,NUM,NAME)
 .I $L(NAMECONV) S NUM=NUM+1 D SETUP("^FSC(""MOD"",",IEN,NUM,NAMECONV_"  - "_NAME)
 .I $L(NAMESP) S NUM=NUM+1 D SETUP("^FSC(""MOD"",",IEN,NUM,NAMESP_"  - "_NAME)
 .S CNT=0 F  S CNT=$O(^FSC("MOD",IEN,2,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""MOD"",",IEN,NUM,VALUE)
 .S ^FSC("MOD",IEN,99,0)="^7105.499^"_NUM_U_NUM
 Q
 ;
PACK ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS PACKAGE"
 K ^FSC("PACK","ACL")
 S IEN=0 F  S IEN=$O(^FSC("PACK",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("PACK",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""PACK"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("PACK",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""PACK"",",IEN,NUM,VALUE)
 .S ^FSC("PACK",IEN,99,0)="^7105.599^"_NUM_U_NUM
 Q
 ;
LTYPE ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS LOCATION TYPE"
 K ^FSC("LTYPE","ACL")
 S IEN=0 F  S IEN=$O(^FSC("LTYPE",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("LTYPE",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""LTYPE"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("LTYPE",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""LTYPE"",",IEN,NUM,VALUE)
 .S ^FSC("LTYPE",IEN,99,0)="^7105.799^"_NUM_U_NUM
 Q
 ;
PACKG ;
 N CNT,IEN,NAME,NUM,SHNAME,SYN,VALUE,ZERO
 ;W !,"NOIS PACKAGE GROUP"
 K ^FSC("PACKG","ACL")
 S IEN=0 F  S IEN=$O(^FSC("PACKG",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("PACKG",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U)),SHNAME=$P(ZERO,U,3)
 .D SETUP("^FSC(""PACKG"",",IEN,NUM,NAME)
 .I $L(SHNAME) S NUM=NUM+1 D SETUP("^FSC(""PACKG"",",IEN,NUM,SHNAME_"  - "_NAME)
 .S CNT=0 F  S CNT=$O(^FSC("PACKG",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""PACKG"",",IEN,NUM,VALUE)
 .S ^FSC("PACKG",IEN,99,0)="^7105.899^"_NUM_U_NUM
 Q
 ;
TASK ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS TASK"
 K ^FSC("TASK","ACL")
 S IEN=0 F  S IEN=$O(^FSC("TASK",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("TASK",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""TASK"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("TASK",IEN,2,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""TASK"",",IEN,NUM,VALUE)
 .S ^FSC("TASK",IEN,99,0)="^7106.399^"_NUM_U_NUM
 Q
 ;
SYSTEM ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS SYSTEM"
 K ^FSC("SYSTEM","ACL")
 S IEN=0 F  S IEN=$O(^FSC("SYSTEM",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("SYSTEM",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""SYSTEM"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("SYSTEM",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""SYSTEM"",",IEN,NUM,VALUE)
 .S ^FSC("SYSTEM",IEN,99,0)="^7106.799^"_NUM_U_NUM
 Q
 ;
FIELD ;
 N CNT,IEN,NAME,NUM,SYN,VALUE,ZERO
 ;W !,"NOIS FIELD"
 K ^FSC("FLD","ACL")
 S IEN=0 F  S IEN=$O(^FSC("FLD",IEN)) Q:IEN<1  S ZERO=^(IEN,0) D
 .K ^FSC("FLD",IEN,99)
 .S NUM=1,NAME=$$MIXCASE($P(ZERO,U))
 .D SETUP("^FSC(""FLD"",",IEN,NUM,NAME)
 .S CNT=0 F  S CNT=$O(^FSC("FLD",IEN,1,CNT)) Q:CNT<1  S SYN=^(CNT,0) D
 ..S NUM=NUM+1,VALUE=$$MIXCASE(SYN_"  - "_NAME)
 ..D SETUP("^FSC(""FLD"",",IEN,NUM,VALUE)
 .S ^FSC("FLD",IEN,99,0)="^7107.299^"_NUM_U_NUM
 Q
 ;
SETUP(FILE,IEN,NUM,VALUE) ;
 N GBL
 S GBL=FILE_IEN_",99,"_NUM_",0)"
 S @GBL=VALUE
 S GBL=FILE_IEN_",99,""B"","""_VALUE_""","_NUM_")"
 S @GBL=""
 S GBL=FILE_"""ACL"","""_$$UP^XLFSTR(VALUE)_""","_IEN_","_NUM_")"
 S @GBL=""
 ;W "."
 Q
MIXCASE(TEXT) ; $$(text) -> mixed case format
 N CHAR
 S TEXT=$$LOW^XLFSTR(TEXT)
 S $E(TEXT)=$$UP^XLFSTR($E(TEXT))
 F CHAR=1:1:$L(TEXT) D
 .I " ,-'/(&"[$E(TEXT,CHAR) S $E(TEXT,CHAR+1)=$$UP^XLFSTR($E(TEXT,CHAR+1))
 Q TEXT
 ;
PRI ; populate primary calls with themselves
 N CALL,CNT,DA,DIE,DR,X,Y
 S CNT=0,DIE="^FSCD(""CALL"","
 S CALL=0 F  S CALL=$O(^FSCD("CALL",CALL)) Q:CALL<1  I $D(^(CALL,120)) D
 .S DA=CALL
 .S DR="101///`"_DA
 .D ^DIE
 .K ^FSCD("CALL",CALL,103)
 .S CNT=CNT+1 I CNT#100=0 W "."
 Q