source: FOIAVistA/trunk/r/NOIS-FSC/FSCDD.m@ 1288

Last change on this file since 1288 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1FSCDD ;SLC/STAFF-NOIS DD Calls ;1/11/98 15:48
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4FIELD(FIELD) ; $$(field) -> external value
5 ; from ^DD(7107.11,3 output transform for FIELD
6 Q $S($L($P($G(^FSC("FLD",+FIELD,0)),U,2)):$P(^(0),U,2),1:"")
7 ;
8COND(COND) ; $$(condition) -> external value
9 ; from ^DD(7107.11,4 output transform for CONDITION
10 Q $S($L($P($G(^FSC("COND",+COND,0)),U,4)):$P(^(0),U,4),1:"")
11 ;
12VALUE(VALUE) ; $$(value) -> external value
13 ; from ^DD(7107.11,5 output transform for VALUE
14 Q:'$L($G(D)) VALUE
15 Q:$E(D)'="^" VALUE
16 N OFFSET,FIELD,FLD,TYPE
17 S FIELD=$P($G(@(D_"0)")),U,4)
18 Q:'FIELD VALUE
19 S TYPE=$P($G(^FSC("FLD",+FIELD,0)),U,3),OFFSET=$P($G(^(0)),U,6),FLD=$P($G(^(0)),U,8)
20 I FLD,$E(TYPE)="P"!($E(TYPE)="D"),$L($T(VALUE^FSCGET)) Q $$VALUE^FSCGET(VALUE,7100,FLD)
21 I $E(TYPE)="P" Q $$POINTER(VALUE,$P(TYPE,"P",2),OFFSET)
22 I $E(TYPE)="D" Q $$FMTE^XLFDT(VALUE)
23 Q VALUE
24 ;
25NONDDV(VALUE,FIELD) ; $$(value,field) -> external value
26 ; external value for VALUE (depends on FIELD) in list definition
27 Q:'$L($G(FIELD)) VALUE
28 N FLD,OFFSET,TYPE
29 S TYPE=$P($G(^FSC("FLD",+FIELD,0)),U,3),OFFSET=$P($G(^(0)),U,6),FLD=$P($G(^(0)),U,8)
30 I FLD,$E(TYPE)="P"!($E(TYPE)="D") Q $$VALUE^FSCGET(VALUE,7100,FLD)
31 I $E(TYPE)="P" Q $$POINTER(VALUE,$P(TYPE,"P",2),OFFSET)
32 I $E(TYPE)="D" Q $$FMTE^XLFDT(VALUE)
33 Q VALUE
34 ;
35POINTER(VALUE,FILE,OFFSET) ; $$(pointer value,file,offset) -> external value
36 I 'VALUE Q ""
37 I '$L($G(OFFSET)) Q $P(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_",0)"),U)
38 Q $P(@(@("^DIC("_FILE_",0,""GL"")")_VALUE_","_+OFFSET_")"),U,+$P(OFFSET,";",2))
Note: See TracBrowser for help on using the repository browser.