FSCDD ;SLC/STAFF-NOIS DD Calls ;1/11/98 15:48
;;1.1;NOIS;;Sep 06, 1998
;
FIELD(FIELD) ; $$(field) -> external value
; from ^DD(7107.11,3 output transform for FIELD
Q $S($L($P($G(^FSC("FLD",+FIELD,0)),U,2)):$P(^(0),U,2),1:"")
;
COND(COND) ; $$(condition) -> external value
; from ^DD(7107.11,4 output transform for CONDITION
Q $S($L($P($G(^FSC("COND",+COND,0)),U,4)):$P(^(0),U,4),1:"")
;
VALUE(VALUE) ; $$(value) -> external value
; from ^DD(7107.11,5 output transform for VALUE
Q:'$L($G(D)) VALUE
Q:$E(D)'="^" VALUE
N OFFSET,FIELD,FLD,TYPE
S FIELD=$P($G(@(D_"0)")),U,4)
Q:'FIELD VALUE
S TYPE=$P($G(^FSC("FLD",+FIELD,0)),U,3),OFFSET=$P($G(^(0)),U,6),FLD=$P($G(^(0)),U,8)
I FLD,$E(TYPE)="P"!($E(TYPE)="D"),$L($T(VALUE^FSCGET)) Q $$VALUE^FSCGET(VALUE,7100,FLD)
I $E(TYPE)="P" Q $$POINTER(VALUE,$P(TYPE,"P",2),OFFSET)
I $E(TYPE)="D" Q $$FMTE^XLFDT(VALUE)
Q VALUE
;
NONDDV(VALUE,FIELD) ; $$(value,field) -> external value
; external value for VALUE (depends on FIELD) in list definition
Q:'$L($G(FIELD)) VALUE
N FLD,OFFSET,TYPE
S TYPE=$P($G(^FSC("FLD",+FIELD,0)),U,3),OFFSET=$P($G(^(0)),U,6),FLD=$P($G(^(0)),U,8)
I FLD,$E(TYPE)="P"!($E(TYPE)="D") Q $$VALUE^FSCGET(VALUE,7100,FLD)
I $E(TYPE)="P" Q $$POINTER(VALUE,$P(TYPE,"P",2),OFFSET)
I $E(TYPE)="D" Q $$FMTE^XLFDT(VALUE)
Q VALUE
;
POINTER(VALUE,FILE,OFFSET) ; $$(pointer value,file,offset) -> external value
I 'VALUE Q ""
I '$L($G(OFFSET)) Q $P(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_",0)"),U)
Q $P(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_","_+OFFSET_")"),U,+$P(OFFSET,";",2))
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCDD 1590 printed Dec 13, 2024@02:17:26 Page 2
FSCDD ;SLC/STAFF-NOIS DD Calls ;1/11/98 15:48
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
FIELD(FIELD) ; $$(field) -> external value
+1 ; from ^DD(7107.11,3 output transform for FIELD
+2 QUIT $SELECT($LENGTH($PIECE($GET(^FSC("FLD",+FIELD,0)),U,2)):$PIECE(^(0),U,2),1:"")
+3 ;
COND(COND) ; $$(condition) -> external value
+1 ; from ^DD(7107.11,4 output transform for CONDITION
+2 QUIT $SELECT($LENGTH($PIECE($GET(^FSC("COND",+COND,0)),U,4)):$PIECE(^(0),U,4),1:"")
+3 ;
VALUE(VALUE) ; $$(value) -> external value
+1 ; from ^DD(7107.11,5 output transform for VALUE
+2 if '$LENGTH($GET(D))
QUIT VALUE
+3 if $EXTRACT(D)'="^"
QUIT VALUE
+4 NEW OFFSET,FIELD,FLD,TYPE
+5 SET FIELD=$PIECE($GET(@(D_"0)")),U,4)
+6 if 'FIELD
QUIT VALUE
+7 SET TYPE=$PIECE($GET(^FSC("FLD",+FIELD,0)),U,3)
SET OFFSET=$PIECE($GET(^(0)),U,6)
SET FLD=$PIECE($GET(^(0)),U,8)
+8 IF FLD
IF $EXTRACT(TYPE)="P"!($EXTRACT(TYPE)="D")
IF $LENGTH($TEXT(VALUE^FSCGET))
QUIT $$VALUE^FSCGET(VALUE,7100,FLD)
+9 IF $EXTRACT(TYPE)="P"
QUIT $$POINTER(VALUE,$PIECE(TYPE,"P",2),OFFSET)
+10 IF $EXTRACT(TYPE)="D"
QUIT $$FMTE^XLFDT(VALUE)
+11 QUIT VALUE
+12 ;
NONDDV(VALUE,FIELD) ; $$(value,field) -> external value
+1 ; external value for VALUE (depends on FIELD) in list definition
+2 if '$LENGTH($GET(FIELD))
QUIT VALUE
+3 NEW FLD,OFFSET,TYPE
+4 SET TYPE=$PIECE($GET(^FSC("FLD",+FIELD,0)),U,3)
SET OFFSET=$PIECE($GET(^(0)),U,6)
SET FLD=$PIECE($GET(^(0)),U,8)
+5 IF FLD
IF $EXTRACT(TYPE)="P"!($EXTRACT(TYPE)="D")
QUIT $$VALUE^FSCGET(VALUE,7100,FLD)
+6 IF $EXTRACT(TYPE)="P"
QUIT $$POINTER(VALUE,$PIECE(TYPE,"P",2),OFFSET)
+7 IF $EXTRACT(TYPE)="D"
QUIT $$FMTE^XLFDT(VALUE)
+8 QUIT VALUE
+9 ;
POINTER(VALUE,FILE,OFFSET) ; $$(pointer value,file,offset) -> external value
+1 IF 'VALUE
QUIT ""
+2 IF '$LENGTH($GET(OFFSET))
QUIT $PIECE(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_",0)"),U)
+3 QUIT $PIECE(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_","_+OFFSET_")"),U,+$PIECE(OFFSET,";",2))