FSCGET ;SLC/STAFF-NOIS Get Call Info ;5/17/98 23:49
;;1.1;NOIS;;Sep 06, 1998
;
GET(VALUES,CALLNUM,ARRAY) ; from FSCED, FSCFORMB, FSCFORMC, FSCFORMD, FSCFORMS, FSCLMPE1, FSCLP, FSCRPCEC, FSCRPCF, FSCRPCWR, FSCRX
; (call number,array) returns array by reference with call info - except for word processing fields
N ALL,KEY,STAMP,VALUE,WEB,ZERO
S ALL=$S(VALUES="CUSTOM":0,1:1)
S ZERO=$G(^FSCD("CALL",+CALLNUM,0)),STAMP=$G(^(120)),KEY=$G(^(1.5)),WEB=$G(^(1.7))
I ALL!$D(ARRAY("SUBJECT")) S ARRAY("SUBJECT")=$G(^FSCD("CALL",+CALLNUM,1))
I ALL!$D(ARRAY("DESC")) S ARRAY("DESC")=$S($D(^FSCD("CALL",+CALLNUM,30)):1,1:"")
I ALL!$D(ARRAY("ACTIONS")) S ARRAY("ACTIONS")=$S($D(^FSCD("CALL",+CALLNUM,50)):1,1:"")
I ALL!$D(ARRAY("SUM")) S ARRAY("SUM")=$S($D(^FSCD("CALL",+CALLNUM,80)):1,1:"")
I ALL!$D(ARRAY("STATHIST")) S ARRAY("STATHIST")=$S($D(^FSCD("CALL",+CALLNUM,110)):1,1:"")
I ALL!$D(ARRAY("DUPHIST")) S ARRAY("DUPHIST")=$S($D(^FSCD("CALL",+CALLNUM,103)):1,1:"")
I ALL!$D(ARRAY("REF")) S ARRAY("REF")=$P(ZERO,U)
I ALL!$D(ARRAY("PHONE")) S ARRAY("PHONE")=$P(ZERO,U,7)_U_$P(ZERO,U,7)
I ALL!$D(ARRAY("HRSTOT")) S ARRAY("HRSTOT")=$P(ZERO,U,13)_U_$P(ZERO,U,13)
I ALL!$D(ARRAY("STATUS")) S (ARRAY("STATUS"),VALUE)=$P(ZERO,U,2) I VALUE S $P(ARRAY("STATUS"),U,2)=$$VALUE(VALUE,7100,4)
I ALL!$D(ARRAY("DATEO")) S (ARRAY("DATEO"),VALUE)=$P(ZERO,U,3) I VALUE S $P(ARRAY("DATEO"),U,2)=$$VALUE(VALUE,7100,10)
I ALL!$D(ARRAY("DATEC")) S (ARRAY("DATEC"),VALUE)=$P(ZERO,U,4) I VALUE S $P(ARRAY("DATEC"),U,2)=$$VALUE(VALUE,7100,82)
I ALL!$D(ARRAY("SITE")) S (ARRAY("SITE"),VALUE)=$P(ZERO,U,5) I VALUE S $P(ARRAY("SITE"),U,2)=$$VALUE(VALUE,7100,2)
I ALL!$D(ARRAY("IRM")) S (ARRAY("IRM"),VALUE)=$P(ZERO,U,6) I VALUE S $P(ARRAY("IRM"),U,2)=$$VALUE(VALUE,7100,2.1)
I ALL!$D(ARRAY("MOD")) S (ARRAY("MOD"),VALUE)=$P(ZERO,U,8) I VALUE S $P(ARRAY("MOD"),U,2)=$$VALUE(VALUE,7100,3)
I ALL!$D(ARRAY("SPEC")) S (ARRAY("SPEC"),VALUE)=$P(ZERO,U,9) I VALUE S $P(ARRAY("SPEC"),U,2)=$$VALUE(VALUE,7100,5)
I ALL!$D(ARRAY("PRI")) S (ARRAY("PRI"),VALUE)=$P(ZERO,U,10) I VALUE S $P(ARRAY("PRI"),U,2)=$$VALUE(VALUE,7100,6)
I ALL!$D(ARRAY("SPECC")) S (ARRAY("SPECC"),VALUE)=$P(ZERO,U,11) I VALUE S $P(ARRAY("SPECC"),U,2)=$$VALUE(VALUE,7100,81)
I ALL!$D(ARRAY("FUNC")) S (ARRAY("FUNC"),VALUE)=$P(ZERO,U,14) I VALUE S $P(ARRAY("FUNC"),U,2)=$$VALUE(VALUE,7100,8)
I ALL!$D(ARRAY("TASK")) S (ARRAY("TASK"),VALUE)=$P(ZERO,U,15) I VALUE S $P(ARRAY("TASK"),U,2)=$$VALUE(VALUE,7100,9)
I ALL!$D(ARRAY("ISC")) S (ARRAY("ISC"),VALUE)=$P(ZERO,U,16) I VALUE S $P(ARRAY("ISC"),U,2)=$$VALUE(VALUE,7100,2.3)
I ALL!$D(ARRAY("ISCD")) S (ARRAY("ISCD"),VALUE)=$P(ZERO,U,20) I VALUE S $P(ARRAY("ISCD"),U,2)=$$VALUE(VALUE,7100,2.4)
I ALL!$D(ARRAY("SPECD")) S (ARRAY("SPECD"),VALUE)=$P(ZERO,U,21) I VALUE S $P(ARRAY("SPECD"),U,2)=$$VALUE(VALUE,7100,5.1)
I ALL!$D(ARRAY("REOPEN")) S (ARRAY("REOPEN"),VALUE)=$P(ZERO,U,22) I VALUE S $P(ARRAY("REOPEN"),U,2)=$$VALUE(VALUE,7100,2.6)
I ALL!$D(ARRAY("RTDIN")) S (ARRAY("RTDIN"),VALUE)=$P(STAMP,U,16) I VALUE S $P(ARRAY("RTDIN"),U,2)=$$VALUE(VALUE,7100,4.7)
I ALL!$D(ARRAY("RTDOUT")) S (ARRAY("RTDOUT"),VALUE)=$P(STAMP,U,17) I VALUE S $P(ARRAY("RTDOUT"),U,2)=$$VALUE(VALUE,7100,4.8)
I ALL!$D(ARRAY("RTDRE")) S (ARRAY("RTDRE"),VALUE)=$P(STAMP,U,18) I VALUE S $P(ARRAY("RTDRE"),U,2)=$$VALUE(VALUE,7100,4.9)
I ALL!$D(ARRAY("RECD")) S (ARRAY("RECD"),VALUE)=$P(STAMP,U) I VALUE S $P(ARRAY("RECD"),U,2)=$$VALUE(VALUE,7100,120)
I ALL!$D(ARRAY("PRIMARY")) S (ARRAY("PRIMARY"),VALUE)=$P(STAMP,U,24) I VALUE S $P(ARRAY("PRIMARY"),U,2)=$$VALUE(VALUE,7100,101)
I ALL!$D(ARRAY("DUP")) S (ARRAY("DUP"),VALUE)=$P(STAMP,U,25) I VALUE S $P(ARRAY("DUP"),U,2)=$$VALUE(VALUE,7100,102)
I ALL!$D(ARRAY("STATD")) S (ARRAY("STATD"),VALUE)=$P(STAMP,U,2) I VALUE S $P(ARRAY("STATD"),U,2)=$$VALUE(VALUE,7100,121)
I ALL!$D(ARRAY("CLOSED")) S (ARRAY("CLOSED"),VALUE)=$P(STAMP,U,3) I VALUE S $P(ARRAY("CLOSED"),U,2)=$$VALUE(VALUE,7100,122)
I ALL!$D(ARRAY("EDITD")) S (ARRAY("EDITD"),VALUE)=$P(STAMP,U,4) I VALUE S $P(ARRAY("EDITD"),U,2)=$$VALUE(VALUE,7100,123)
I ALL!$D(ARRAY("EDITBY")) S (ARRAY("EDITBY"),VALUE)=$P(STAMP,U,5) I VALUE S $P(ARRAY("EDITBY"),U,2)=$$VALUE(VALUE,7100,124)
I ALL!$D(ARRAY("PACK")) S (ARRAY("PACK"),VALUE)=$P(STAMP,U,9) I VALUE S $P(ARRAY("PACK"),U,2)=$$VALUE(VALUE,7100,3.1)
I ALL!$D(ARRAY("ISCP")) S (ARRAY("ISCP"),VALUE)=$P(STAMP,U,10) I VALUE S $P(ARRAY("ISCP"),U,2)=$$VALUE(VALUE,7100,2.55)
I ALL!$D(ARRAY("DEVSUB")) S (ARRAY("DEVSUB"),VALUE)=$P(STAMP,U,11) I VALUE S $P(ARRAY("DEVSUB"),U,2)=$$VALUE(VALUE,7100,3.2)
I ALL!$D(ARRAY("LTYPE")) S (ARRAY("LTYPE"),VALUE)=$P(STAMP,U,12) I VALUE S $P(ARRAY("LTYPE"),U,2)=$$VALUE(VALUE,7100,2.7)
I ALL!$D(ARRAY("SYS")) S (ARRAY("SYS"),VALUE)=$P(STAMP,U,19) I VALUE S $P(ARRAY("SYS"),U,2)=$$VALUE(VALUE,7100,2.9)
I ALL!$D(ARRAY("PATCH")) S (ARRAY("PATCH"),VALUE)=$P(STAMP,U,14)_U_$P(STAMP,U,14)
I ALL!$D(ARRAY("VISN")) S (ARRAY("VISN"),VALUE)=$P(STAMP,U,15)_U_$P(STAMP,U,15)
I ALL!$D(ARRAY("KEYWORDS")) S (ARRAY("KEYWORDS"),VALUE)=$P(KEY,U,1)_U_$P(KEY,U,1)
I ALL!$D(ARRAY("WEB")) S (ARRAY("WEB"),VALUE)=$P(WEB,U,1)_U_$P(WEB,U,1)
I ALL!$D(ARRAY("PACKG")) S (ARRAY("PACKG"),VALUE)=$P(STAMP,U,13) I VALUE S $P(ARRAY("PACKG"),U,2)=$$VALUE(VALUE,7100,3.3)
I ALL!$D(ARRAY("EP")) S (ARRAY("EP"),VALUE)=$P(STAMP,U,20) I VALUE S $P(ARRAY("EP"),U,2)=$$VALUE(VALUE,7100,5.2)
I ALL!$D(ARRAY("EPT")) S (ARRAY("EPT"),VALUE)=$P(STAMP,U,21) I VALUE S $P(ARRAY("EPT"),U,2)=$$VALUE(VALUE,7100,5.3)
I ALL!$D(ARRAY("DEVSTAT")) S (ARRAY("DEVSTAT"),VALUE)=$P(ZERO,U,17) I VALUE S $P(ARRAY("DEVSTAT"),U,2)=$$VALUE(VALUE,7100,4.1)
I ALL!$D(ARRAY("AGE")) S ARRAY("AGE")=$P(ZERO,U,18)_U_$P(ZERO,U,18)
I ALL!$D(ARRAY("AGEEDIT")) S ARRAY("AGEEDIT")=$P(ZERO,U,19)_U_$P(ZERO,U,19)
I ALL!$D(ARRAY("AGESTAT")) S ARRAY("AGESTAT")=$P(ZERO,U,23)_U_$P(ZERO,U,23)
I ALL!$D(ARRAY("PT")) S ARRAY("PT")=$P(STAMP,U,23)_U_$P(STAMP,U,23)
I ALL!$D(ARRAY("PDT")) S (ARRAY("PDT"),VALUE)=$P(STAMP,U,22) I VALUE S $P(ARRAY("PDT"),U,2)=$$VALUE(VALUE,7100,125)
D PFIELDS^FSCGETP
Q
;
VALUE(Y,FILE,FIELD) ; $$(internal value,file,field) -> external value or ""
I 'Y Q ""
I FILE=7100 Q $$NOISCALL(Y,FIELD)
N C S C=$P(^DD(FILE,FIELD,0),U,2) D Y^DIQ Q Y
;
NOISCALL(Y,FIELD) ; $$(internal value,field) -> external value in 7100
I FIELD=2 Q $P($G(^FSC("SITE",Y,0)),U)
I FIELD=2.1 Q $P($G(^VA(200,Y,0)),U)
I FIELD=2.3 Q $P($G(^FSC("ISC",Y,0)),U)
I FIELD=2.4 Q $P($G(^FSC("ISC",Y,0)),U)
I FIELD=2.55 Q $P($G(^FSC("ISC",Y,0)),U)
I FIELD=2.6 Q $$FMTE^XLFDT(Y)
I FIELD=2.7 Q $P($G(^FSC("LTYPE",Y,0)),U)
I FIELD=2.8 Q $P($G(^FSC("VISN",Y,0)),U)
I FIELD=2.9 Q $P($G(^FSC("SYSTEM",Y,0)),U)
I FIELD=3 Q $P($G(^FSC("MOD",Y,0)),U)
I FIELD=3.1 Q $P($G(^FSC("PACK",Y,0)),U)
I FIELD=3.2 Q $P($G(^FSC("SUB",Y,0)),U)
I FIELD=3.3 Q $P($G(^FSC("PACKG",Y,0)),U)
I FIELD=4 Q $P($G(^FSC("STATUS",Y,0)),U)
I FIELD=4.1 Q $P($G(^FSC("STATUS",Y,0)),U)
I FIELD=4.5 Q $P($G(^FSC("STATUS",Y,0)),U)
I FIELD=4.6 Q $P($G(^FSC("STATUS",Y,0)),U)
I FIELD=4.7 Q $$FMTE^XLFDT(Y)
I FIELD=4.8 Q $$FMTE^XLFDT(Y)
I FIELD=4.9 Q $$FMTE^XLFDT(Y)
I FIELD=5 Q $P($G(^VA(200,Y,0)),U)
I FIELD=5.1 Q $P($G(^VA(200,Y,0)),U)
I FIELD=5.2 Q $P($G(^VA(200,Y,0)),U)
I FIELD=5.3 Q $P($G(^FSC("EPTYPE",Y,0)),U)
I FIELD=6 Q $P($G(^FSC("PRI",Y,0)),U)
I FIELD=8 Q $P($G(^FSC("FUNC",Y,0)),U)
I FIELD=9 Q $P($G(^FSC("TASK",Y,0)),U)
I FIELD=10 Q $$FMTE^XLFDT(Y)
I FIELD=81 Q $P($G(^VA(200,Y,0)),U)
I FIELD=82 Q $$FMTE^XLFDT(Y)
I FIELD=101 Q $P($G(^FSCD("CALL",Y,0)),U)
I FIELD=102 Q $P($G(^FSCD("CALL",Y,0)),U)
I FIELD=120 Q $$FMTE^XLFDT(Y)
I FIELD=121 Q $$FMTE^XLFDT(Y)
I FIELD=122 Q $$FMTE^XLFDT(Y)
I FIELD=123 Q $$FMTE^XLFDT(Y)
I FIELD=124 Q $P($G(^VA(200,Y,0)),U)
I FIELD=125 Q $$FMTE^XLFDT(Y)
Q Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCGET 7811 printed Dec 13, 2024@02:17:55 Page 2
FSCGET ;SLC/STAFF-NOIS Get Call Info ;5/17/98 23:49
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
GET(VALUES,CALLNUM,ARRAY) ; from FSCED, FSCFORMB, FSCFORMC, FSCFORMD, FSCFORMS, FSCLMPE1, FSCLP, FSCRPCEC, FSCRPCF, FSCRPCWR, FSCRX
+1 ; (call number,array) returns array by reference with call info - except for word processing fields
+2 NEW ALL,KEY,STAMP,VALUE,WEB,ZERO
+3 SET ALL=$SELECT(VALUES="CUSTOM":0,1:1)
+4 SET ZERO=$GET(^FSCD("CALL",+CALLNUM,0))
SET STAMP=$GET(^(120))
SET KEY=$GET(^(1.5))
SET WEB=$GET(^(1.7))
+5 IF ALL!$DATA(ARRAY("SUBJECT"))
SET ARRAY("SUBJECT")=$GET(^FSCD("CALL",+CALLNUM,1))
+6 IF ALL!$DATA(ARRAY("DESC"))
SET ARRAY("DESC")=$SELECT($DATA(^FSCD("CALL",+CALLNUM,30)):1,1:"")
+7 IF ALL!$DATA(ARRAY("ACTIONS"))
SET ARRAY("ACTIONS")=$SELECT($DATA(^FSCD("CALL",+CALLNUM,50)):1,1:"")
+8 IF ALL!$DATA(ARRAY("SUM"))
SET ARRAY("SUM")=$SELECT($DATA(^FSCD("CALL",+CALLNUM,80)):1,1:"")
+9 IF ALL!$DATA(ARRAY("STATHIST"))
SET ARRAY("STATHIST")=$SELECT($DATA(^FSCD("CALL",+CALLNUM,110)):1,1:"")
+10 IF ALL!$DATA(ARRAY("DUPHIST"))
SET ARRAY("DUPHIST")=$SELECT($DATA(^FSCD("CALL",+CALLNUM,103)):1,1:"")
+11 IF ALL!$DATA(ARRAY("REF"))
SET ARRAY("REF")=$PIECE(ZERO,U)
+12 IF ALL!$DATA(ARRAY("PHONE"))
SET ARRAY("PHONE")=$PIECE(ZERO,U,7)_U_$PIECE(ZERO,U,7)
+13 IF ALL!$DATA(ARRAY("HRSTOT"))
SET ARRAY("HRSTOT")=$PIECE(ZERO,U,13)_U_$PIECE(ZERO,U,13)
+14 IF ALL!$DATA(ARRAY("STATUS"))
SET (ARRAY("STATUS"),VALUE)=$PIECE(ZERO,U,2)
IF VALUE
SET $PIECE(ARRAY("STATUS"),U,2)=$$VALUE(VALUE,7100,4)
+15 IF ALL!$DATA(ARRAY("DATEO"))
SET (ARRAY("DATEO"),VALUE)=$PIECE(ZERO,U,3)
IF VALUE
SET $PIECE(ARRAY("DATEO"),U,2)=$$VALUE(VALUE,7100,10)
+16 IF ALL!$DATA(ARRAY("DATEC"))
SET (ARRAY("DATEC"),VALUE)=$PIECE(ZERO,U,4)
IF VALUE
SET $PIECE(ARRAY("DATEC"),U,2)=$$VALUE(VALUE,7100,82)
+17 IF ALL!$DATA(ARRAY("SITE"))
SET (ARRAY("SITE"),VALUE)=$PIECE(ZERO,U,5)
IF VALUE
SET $PIECE(ARRAY("SITE"),U,2)=$$VALUE(VALUE,7100,2)
+18 IF ALL!$DATA(ARRAY("IRM"))
SET (ARRAY("IRM"),VALUE)=$PIECE(ZERO,U,6)
IF VALUE
SET $PIECE(ARRAY("IRM"),U,2)=$$VALUE(VALUE,7100,2.1)
+19 IF ALL!$DATA(ARRAY("MOD"))
SET (ARRAY("MOD"),VALUE)=$PIECE(ZERO,U,8)
IF VALUE
SET $PIECE(ARRAY("MOD"),U,2)=$$VALUE(VALUE,7100,3)
+20 IF ALL!$DATA(ARRAY("SPEC"))
SET (ARRAY("SPEC"),VALUE)=$PIECE(ZERO,U,9)
IF VALUE
SET $PIECE(ARRAY("SPEC"),U,2)=$$VALUE(VALUE,7100,5)
+21 IF ALL!$DATA(ARRAY("PRI"))
SET (ARRAY("PRI"),VALUE)=$PIECE(ZERO,U,10)
IF VALUE
SET $PIECE(ARRAY("PRI"),U,2)=$$VALUE(VALUE,7100,6)
+22 IF ALL!$DATA(ARRAY("SPECC"))
SET (ARRAY("SPECC"),VALUE)=$PIECE(ZERO,U,11)
IF VALUE
SET $PIECE(ARRAY("SPECC"),U,2)=$$VALUE(VALUE,7100,81)
+23 IF ALL!$DATA(ARRAY("FUNC"))
SET (ARRAY("FUNC"),VALUE)=$PIECE(ZERO,U,14)
IF VALUE
SET $PIECE(ARRAY("FUNC"),U,2)=$$VALUE(VALUE,7100,8)
+24 IF ALL!$DATA(ARRAY("TASK"))
SET (ARRAY("TASK"),VALUE)=$PIECE(ZERO,U,15)
IF VALUE
SET $PIECE(ARRAY("TASK"),U,2)=$$VALUE(VALUE,7100,9)
+25 IF ALL!$DATA(ARRAY("ISC"))
SET (ARRAY("ISC"),VALUE)=$PIECE(ZERO,U,16)
IF VALUE
SET $PIECE(ARRAY("ISC"),U,2)=$$VALUE(VALUE,7100,2.3)
+26 IF ALL!$DATA(ARRAY("ISCD"))
SET (ARRAY("ISCD"),VALUE)=$PIECE(ZERO,U,20)
IF VALUE
SET $PIECE(ARRAY("ISCD"),U,2)=$$VALUE(VALUE,7100,2.4)
+27 IF ALL!$DATA(ARRAY("SPECD"))
SET (ARRAY("SPECD"),VALUE)=$PIECE(ZERO,U,21)
IF VALUE
SET $PIECE(ARRAY("SPECD"),U,2)=$$VALUE(VALUE,7100,5.1)
+28 IF ALL!$DATA(ARRAY("REOPEN"))
SET (ARRAY("REOPEN"),VALUE)=$PIECE(ZERO,U,22)
IF VALUE
SET $PIECE(ARRAY("REOPEN"),U,2)=$$VALUE(VALUE,7100,2.6)
+29 IF ALL!$DATA(ARRAY("RTDIN"))
SET (ARRAY("RTDIN"),VALUE)=$PIECE(STAMP,U,16)
IF VALUE
SET $PIECE(ARRAY("RTDIN"),U,2)=$$VALUE(VALUE,7100,4.7)
+30 IF ALL!$DATA(ARRAY("RTDOUT"))
SET (ARRAY("RTDOUT"),VALUE)=$PIECE(STAMP,U,17)
IF VALUE
SET $PIECE(ARRAY("RTDOUT"),U,2)=$$VALUE(VALUE,7100,4.8)
+31 IF ALL!$DATA(ARRAY("RTDRE"))
SET (ARRAY("RTDRE"),VALUE)=$PIECE(STAMP,U,18)
IF VALUE
SET $PIECE(ARRAY("RTDRE"),U,2)=$$VALUE(VALUE,7100,4.9)
+32 IF ALL!$DATA(ARRAY("RECD"))
SET (ARRAY("RECD"),VALUE)=$PIECE(STAMP,U)
IF VALUE
SET $PIECE(ARRAY("RECD"),U,2)=$$VALUE(VALUE,7100,120)
+33 IF ALL!$DATA(ARRAY("PRIMARY"))
SET (ARRAY("PRIMARY"),VALUE)=$PIECE(STAMP,U,24)
IF VALUE
SET $PIECE(ARRAY("PRIMARY"),U,2)=$$VALUE(VALUE,7100,101)
+34 IF ALL!$DATA(ARRAY("DUP"))
SET (ARRAY("DUP"),VALUE)=$PIECE(STAMP,U,25)
IF VALUE
SET $PIECE(ARRAY("DUP"),U,2)=$$VALUE(VALUE,7100,102)
+35 IF ALL!$DATA(ARRAY("STATD"))
SET (ARRAY("STATD"),VALUE)=$PIECE(STAMP,U,2)
IF VALUE
SET $PIECE(ARRAY("STATD"),U,2)=$$VALUE(VALUE,7100,121)
+36 IF ALL!$DATA(ARRAY("CLOSED"))
SET (ARRAY("CLOSED"),VALUE)=$PIECE(STAMP,U,3)
IF VALUE
SET $PIECE(ARRAY("CLOSED"),U,2)=$$VALUE(VALUE,7100,122)
+37 IF ALL!$DATA(ARRAY("EDITD"))
SET (ARRAY("EDITD"),VALUE)=$PIECE(STAMP,U,4)
IF VALUE
SET $PIECE(ARRAY("EDITD"),U,2)=$$VALUE(VALUE,7100,123)
+38 IF ALL!$DATA(ARRAY("EDITBY"))
SET (ARRAY("EDITBY"),VALUE)=$PIECE(STAMP,U,5)
IF VALUE
SET $PIECE(ARRAY("EDITBY"),U,2)=$$VALUE(VALUE,7100,124)
+39 IF ALL!$DATA(ARRAY("PACK"))
SET (ARRAY("PACK"),VALUE)=$PIECE(STAMP,U,9)
IF VALUE
SET $PIECE(ARRAY("PACK"),U,2)=$$VALUE(VALUE,7100,3.1)
+40 IF ALL!$DATA(ARRAY("ISCP"))
SET (ARRAY("ISCP"),VALUE)=$PIECE(STAMP,U,10)
IF VALUE
SET $PIECE(ARRAY("ISCP"),U,2)=$$VALUE(VALUE,7100,2.55)
+41 IF ALL!$DATA(ARRAY("DEVSUB"))
SET (ARRAY("DEVSUB"),VALUE)=$PIECE(STAMP,U,11)
IF VALUE
SET $PIECE(ARRAY("DEVSUB"),U,2)=$$VALUE(VALUE,7100,3.2)
+42 IF ALL!$DATA(ARRAY("LTYPE"))
SET (ARRAY("LTYPE"),VALUE)=$PIECE(STAMP,U,12)
IF VALUE
SET $PIECE(ARRAY("LTYPE"),U,2)=$$VALUE(VALUE,7100,2.7)
+43 IF ALL!$DATA(ARRAY("SYS"))
SET (ARRAY("SYS"),VALUE)=$PIECE(STAMP,U,19)
IF VALUE
SET $PIECE(ARRAY("SYS"),U,2)=$$VALUE(VALUE,7100,2.9)
+44 IF ALL!$DATA(ARRAY("PATCH"))
SET (ARRAY("PATCH"),VALUE)=$PIECE(STAMP,U,14)_U_$PIECE(STAMP,U,14)
+45 IF ALL!$DATA(ARRAY("VISN"))
SET (ARRAY("VISN"),VALUE)=$PIECE(STAMP,U,15)_U_$PIECE(STAMP,U,15)
+46 IF ALL!$DATA(ARRAY("KEYWORDS"))
SET (ARRAY("KEYWORDS"),VALUE)=$PIECE(KEY,U,1)_U_$PIECE(KEY,U,1)
+47 IF ALL!$DATA(ARRAY("WEB"))
SET (ARRAY("WEB"),VALUE)=$PIECE(WEB,U,1)_U_$PIECE(WEB,U,1)
+48 IF ALL!$DATA(ARRAY("PACKG"))
SET (ARRAY("PACKG"),VALUE)=$PIECE(STAMP,U,13)
IF VALUE
SET $PIECE(ARRAY("PACKG"),U,2)=$$VALUE(VALUE,7100,3.3)
+49 IF ALL!$DATA(ARRAY("EP"))
SET (ARRAY("EP"),VALUE)=$PIECE(STAMP,U,20)
IF VALUE
SET $PIECE(ARRAY("EP"),U,2)=$$VALUE(VALUE,7100,5.2)
+50 IF ALL!$DATA(ARRAY("EPT"))
SET (ARRAY("EPT"),VALUE)=$PIECE(STAMP,U,21)
IF VALUE
SET $PIECE(ARRAY("EPT"),U,2)=$$VALUE(VALUE,7100,5.3)
+51 IF ALL!$DATA(ARRAY("DEVSTAT"))
SET (ARRAY("DEVSTAT"),VALUE)=$PIECE(ZERO,U,17)
IF VALUE
SET $PIECE(ARRAY("DEVSTAT"),U,2)=$$VALUE(VALUE,7100,4.1)
+52 IF ALL!$DATA(ARRAY("AGE"))
SET ARRAY("AGE")=$PIECE(ZERO,U,18)_U_$PIECE(ZERO,U,18)
+53 IF ALL!$DATA(ARRAY("AGEEDIT"))
SET ARRAY("AGEEDIT")=$PIECE(ZERO,U,19)_U_$PIECE(ZERO,U,19)
+54 IF ALL!$DATA(ARRAY("AGESTAT"))
SET ARRAY("AGESTAT")=$PIECE(ZERO,U,23)_U_$PIECE(ZERO,U,23)
+55 IF ALL!$DATA(ARRAY("PT"))
SET ARRAY("PT")=$PIECE(STAMP,U,23)_U_$PIECE(STAMP,U,23)
+56 IF ALL!$DATA(ARRAY("PDT"))
SET (ARRAY("PDT"),VALUE)=$PIECE(STAMP,U,22)
IF VALUE
SET $PIECE(ARRAY("PDT"),U,2)=$$VALUE(VALUE,7100,125)
+57 DO PFIELDS^FSCGETP
+58 QUIT
+59 ;
VALUE(Y,FILE,FIELD) ; $$(internal value,file,field) -> external value or ""
+1 IF 'Y
QUIT ""
+2 IF FILE=7100
QUIT $$NOISCALL(Y,FIELD)
+3 NEW C
SET C=$PIECE(^DD(FILE,FIELD,0),U,2)
DO Y^DIQ
QUIT Y
+4 ;
NOISCALL(Y,FIELD) ; $$(internal value,field) -> external value in 7100
+1 IF FIELD=2
QUIT $PIECE($GET(^FSC("SITE",Y,0)),U)
+2 IF FIELD=2.1
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+3 IF FIELD=2.3
QUIT $PIECE($GET(^FSC("ISC",Y,0)),U)
+4 IF FIELD=2.4
QUIT $PIECE($GET(^FSC("ISC",Y,0)),U)
+5 IF FIELD=2.55
QUIT $PIECE($GET(^FSC("ISC",Y,0)),U)
+6 IF FIELD=2.6
QUIT $$FMTE^XLFDT(Y)
+7 IF FIELD=2.7
QUIT $PIECE($GET(^FSC("LTYPE",Y,0)),U)
+8 IF FIELD=2.8
QUIT $PIECE($GET(^FSC("VISN",Y,0)),U)
+9 IF FIELD=2.9
QUIT $PIECE($GET(^FSC("SYSTEM",Y,0)),U)
+10 IF FIELD=3
QUIT $PIECE($GET(^FSC("MOD",Y,0)),U)
+11 IF FIELD=3.1
QUIT $PIECE($GET(^FSC("PACK",Y,0)),U)
+12 IF FIELD=3.2
QUIT $PIECE($GET(^FSC("SUB",Y,0)),U)
+13 IF FIELD=3.3
QUIT $PIECE($GET(^FSC("PACKG",Y,0)),U)
+14 IF FIELD=4
QUIT $PIECE($GET(^FSC("STATUS",Y,0)),U)
+15 IF FIELD=4.1
QUIT $PIECE($GET(^FSC("STATUS",Y,0)),U)
+16 IF FIELD=4.5
QUIT $PIECE($GET(^FSC("STATUS",Y,0)),U)
+17 IF FIELD=4.6
QUIT $PIECE($GET(^FSC("STATUS",Y,0)),U)
+18 IF FIELD=4.7
QUIT $$FMTE^XLFDT(Y)
+19 IF FIELD=4.8
QUIT $$FMTE^XLFDT(Y)
+20 IF FIELD=4.9
QUIT $$FMTE^XLFDT(Y)
+21 IF FIELD=5
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+22 IF FIELD=5.1
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+23 IF FIELD=5.2
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+24 IF FIELD=5.3
QUIT $PIECE($GET(^FSC("EPTYPE",Y,0)),U)
+25 IF FIELD=6
QUIT $PIECE($GET(^FSC("PRI",Y,0)),U)
+26 IF FIELD=8
QUIT $PIECE($GET(^FSC("FUNC",Y,0)),U)
+27 IF FIELD=9
QUIT $PIECE($GET(^FSC("TASK",Y,0)),U)
+28 IF FIELD=10
QUIT $$FMTE^XLFDT(Y)
+29 IF FIELD=81
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+30 IF FIELD=82
QUIT $$FMTE^XLFDT(Y)
+31 IF FIELD=101
QUIT $PIECE($GET(^FSCD("CALL",Y,0)),U)
+32 IF FIELD=102
QUIT $PIECE($GET(^FSCD("CALL",Y,0)),U)
+33 IF FIELD=120
QUIT $$FMTE^XLFDT(Y)
+34 IF FIELD=121
QUIT $$FMTE^XLFDT(Y)
+35 IF FIELD=122
QUIT $$FMTE^XLFDT(Y)
+36 IF FIELD=123
QUIT $$FMTE^XLFDT(Y)
+37 IF FIELD=124
QUIT $PIECE($GET(^VA(200,Y,0)),U)
+38 IF FIELD=125
QUIT $$FMTE^XLFDT(Y)
+39 QUIT Y