Changeset 364 for ccr/trunk/p/C0CFM1.m
- Timestamp:
- Feb 9, 2009, 7:16:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CFM1.m
r360 r364 18 18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 19 ; 20 W "This is the CCR RXNORMUtility Library ",!20 W "This is the CCR FILEMAN Utility Library ",! 21 21 W ! 22 22 Q … … 32 32 . S C0CVARS=$NA(@C0CGLB) 33 33 . S C0CI="" 34 . F S C0CI=$O( C0CVARS(C0CI)) Q:C0CI="" D ;FOR EACH SECTION35 . . S C0CVARSN=$NA( C0CVARS(C0CI)) ; GRAB ONE SECTION34 . F S C0CI=$O(@C0CVARS@(C0CI)) Q:C0CI="" D ;FOR EACH SECTION 35 . . S C0CVARSN=$NA(@C0CVARS@(C0CI)) ; GRAB ONE SECTION 36 36 . . D PUTRIM1(DFN,C0CI,C0CVARSN) 37 37 Q 38 38 ; 39 PUTRIM1(DFN,ZZTYP,ZVARS) ; INTERNAL TO PUTRIM FOR ONE SECTION39 PUTRIM1(DFN,ZZTYP,ZVARS) ; PUT ONE SECTION OF VARIABLES INTO CCR ELEMENTS 40 40 ; ZVARS IS PASSED BY NAME AN HAS THE FORM @ZVARS@(1,"VAR1")="VAL1" 41 41 S C0CX=0 42 F S C0CX=$O(@ZVARS@(C0CX)) Q:C0CX=2 D ; FOR EACH OCCURANCE 42 F S C0CX=$O(@ZVARS@(C0CX)) Q:C0CX="" D ; FOR EACH OCCURANCE 43 . W "ZOCC=",C0CX,! 43 44 . S C0CV=$NA(@ZVARS@(C0CX)) ; VARIABLES FOR THIS OCCURANCE 44 . B45 45 . D PUTELS(DFN,ZZTYP,C0CX,C0CV) ; PUT THEM TO THE CCR ELEMENTS FILE 46 46 Q … … 56 56 S ZSRC=1 ; CCR SOURCE IS ASSUMED TO BE THIS EHR, WHICH IS ALWAYS SOURCE 1 57 57 ; PUT THIS IN PARAMETERS - SO SOURCE NUMBER FOR PROCESSING IN CONFIGURABLE 58 N ZF,ZSUBF S ZF=171.201 S ZSUBF=171.20122 ;FILE AND SUBFILE NUMBERS 58 N ZF,ZFV S ZF=171.201 S ZFV=171.2012 59 S ZSUBF=171.20122 ;FILE AND SUBFILE NUMBERS 59 60 N ZSFV S ZSFV=171.201221 ; SUBFILE VARIABLE FILE NUMBER 60 61 N ZTYPN S ZTYPN=$O(^C0CDIC(170.101,"B",ZTYPE,"")) … … 62 63 N ZVARN ; IEN OF VARIABLE BEING PROCESSED 63 64 ;N C0CFDA ; FDA FOR CCR ELEMENT UPDATE 64 S C0CFDA(ZF,"+1,",.01)=DFN 65 S C0CFDA(ZF,"+1,"_DFN_",",.02)=ZSRC 66 S C0CFDA(ZF,"+1,"_DFN_","_ZSRC_",",.03)=ZTYPN 67 S C0CFDA(ZF,"+1,"_DFN_","_ZSRC_","_ZTYPN_",",.04)=ZOCC ;CREATE OCCURANCE 65 S C0CFDA(ZF,"?+1,",.01)=DFN 66 S C0CFDA(ZF,"?+1,",.02)=ZSRC 67 S C0CFDA(ZF,"?+1,",.03)=ZTYPN 68 S C0CFDA(ZF,"?+1,",.04)=ZOCC ;CREATE OCCURANCE 69 K ZERR 70 D UPDATE^DIE("","C0CFDA","","ZERR") ;ASSIGN RECORD NUMBER 71 I $D(ZERR) B ;OOPS 72 K C0CFDA 73 S ZD0=$O(^C0C(ZF,"C",DFN,ZSRC,ZTYPN,ZOCC,"")) 74 W "RECORD NUMBER: ",ZD0,! 75 ;B 76 S ZCNT=0 68 77 S ZC0CI="" ; 69 78 F S ZC0CI=$O(@ZVALS@(ZC0CI)) Q:ZC0CI="" D ; 70 79 . I ZC0CI'="M" D ; NOT A SUBVARIABLE 80 . . S ZCNT=ZCNT+1 ;INCREMENT COUNT 71 81 . . S ZVARN=$$VARPTR(ZC0CI,ZTYPE) ;GET THE POINTER TO THE VAR IN THE CCR DICT 72 82 . . ; WILL ALLOW FOR LAYGO IF THE VARIABLE IS NOT FOUND 73 . . S C0CFDA(ZSFV,"+1,"_DFN_","_ZSRC_","_ZTYPN_","_ZOCC_",",.01)=ZVARN 74 . . S C0CFDA(ZSFV,"+1,"_DFN_","_ZSRC_","_ZTYPN_","_ZOCC_",",1)=@ZVALS@(ZC0CI) 83 . . S C0CFDA(ZFV,"?+"_ZCNT_","_ZD0_",",.01)=ZVARN 84 . . S C0CFDA(ZFV,"?+"_ZCNT_","_ZD0_",",1)=@ZVALS@(ZC0CI) 85 . . ;S C0CFDA(ZSFV,"+1,"_DFN_","_ZSRC_","_ZTYPN_","_ZOCC_",",.01)=ZVARN 86 . . ;S C0CFDA(ZSFV,"+1,"_DFN_","_ZSRC_","_ZTYPN_","_ZOCC_",",1)=@ZVALS@(ZC0CI) 75 87 ;S GT1(170,"?+1,",.01)="ZZZ NEW MEDVEHICLETEXT" 76 88 ;S GT1(170,"?+1,",12)="DIR"
Note:
See TracChangeset
for help on using the changeset viewer.