Changeset 530


Ignore:
Timestamp:
Jun 16, 2009, 9:09:49 PM (15 years ago)
Author:
George Lilly
Message:

updates for RPMS install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CLA7DD.m

    r529 r530  
    1 C0CLA7DD        ;WV/JMC - CCD/CCR Post Install DD X-Ref Setup Routine; ;18 May 2009
     1C0CLA7DD        ;WV/JMC - CCD/CCR Post Install DD X-Ref Setup Routine; ;14 Jun 2009
    22        ;;1.0;C0C;;May 19, 2009;
    33        ;
     
    88        ;
    99EN      ; Add new style cross-references to V LAB file if it exists.
     10        ; OLD entry point - see new KIDS check points in C0CENV.
    1011        ;
    1112        ;
     
    1617        ;
    1718        S MSG="Starting installation of ALR1 cross-reference at "_$$HTE^XLFDT($H,"1Z")
    18         D MES^XPDUTL(MSG)
     19        D BMES(MSG)
    1920        D ALR1
    2021        S MSG="Installation of ALR1 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
    21         D MES^XPDUTL(MSG)
     22        D BMES(MSG)
    2223        ;
    2324        S MSG="Starting installation of ALR2 cross-reference at "_$$HTE^XLFDT($H,"1Z")
    24         D MES^XPDUTL(MSG)
     25        D BMES(MSG)
    2526        D ALR2
    2627        S MSG="Installation of ALR2 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
    27         D MES^XPDUTL(MSG)
     28        D BMES(MSG)
    2829        ;
    2930        S MSG="Starting installation of ALR3 cross-reference at "_$$HTE^XLFDT($H,"1Z")
    30         D MES^XPDUTL(MSG)
     31        D BMES(MSG)
    3132        D ALR3
    3233        S MSG="Installation of ALR3 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
    33         D MES^XPDUTL(MSG)
     34        D BMES(MSG)
    3435        ;
    3536        S MSG="Starting installation of ALR4 cross-reference at "_$$HTE^XLFDT($H,"1Z")
    36         D MES^XPDUTL(MSG)
     37        D BMES(MSG)
    3738        D ALR4
    3839        S MSG="Installation of ALR4 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
    39         D MES^XPDUTL(MSG)
     40        D BMES(MSG)
    4041        ;
    4142        S MSG="Starting installation of ALR5 cross-reference at "_$$HTE^XLFDT($H,"1Z")
    42         D MES^XPDUTL(MSG)
     43        D BMES(MSG)
    4344        D ALR5
    4445        S MSG="Installation of ALR5 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
    45         D MES^XPDUTL(MSG)
    46         ;
    47         Q
    48         ;
    49         ;
    50 ALR1    ;
    51         ;
    52         N C0CFLAG,C0CXR,C0CRES,C0COUT
    53         ;
    54         S C0CFLAG="S"
    55         I '$D(ZTQUEUED) S C0CFLAG=COCFLAG_"W"
     46        D BMES(MSG)
     47        ;
     48        Q
     49        ;
     50        ;
     51ALR1    ; Installation of ALR1 cross-reference
     52        ;
     53        N C0CFLAG,C0CXR,C0CRES,C0COUT
     54        ;
     55        S C0CFLAG=""
    5656        ;
    5757        S C0CXR("FILE")=9000010.09
     
    8080        ;
    8181        ;
    82 ALR2    ;
    83         ;
    84         N C0CFLAG,C0CXR,C0CRES,C0COUT
    85         ;
    86         S C0CFLAG="S"
    87         I '$D(ZTQUEUED) S C0CFLAG=COCFLAG_"W"
     82ALR2    ; Installation of ALR2 cross-reference
     83        ;
     84        N C0CFLAG,C0CXR,C0CRES,C0COUT
     85        ;
     86        S C0CFLAG=""
    8887        ;
    8988        S C0CXR("FILE")=9000010.09
     
    121120        ;
    122121        ;
    123 ALR3    ;
    124         ;
    125         N C0CFLAG,C0CXR,C0CRES,C0COUT
    126         ;
    127         S C0CFLAG="S"
    128         I '$D(ZTQUEUED) S C0CFLAG=COCFLAG_"W"
    129         ;
    130         S C0CXR("FILE")=9000010.09
    131         S C0CXR("NAME")="ALR2"
    132         S C0CXR("TYPE")="MU"
    133         S C0CXR("USE")="S"
    134         S C0CXR("EXECUTION")="R"
    135         S C0CXR("ACTIVITY")="IR"
    136         S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result."
    137         S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes"
    138         S C0CXR("DESCR",2)="that has been assigned to a lab result. Allows queries to"
    139         S C0CXR("DESCR",3)="retrieve the LOINC code associated with a specific test"
    140         S C0CXR("DESCR",4)="result."
    141         S C0CXR("SET")="S ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)="""""
    142         S C0CXR("KILL")="K ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)"
    143         S C0CXR("WHOLE KILL")="K ^AUPNVLAB(""ALR2"")"
     122ALR3    ; Installation of ALR3 cross-reference
     123        ;
     124        N C0CFLAG,C0CXR,C0CRES,C0COUT
     125        ;
     126        S C0CFLAG=""
     127        ;
     128        S C0CXR("FILE")=9000010.09
     129        S C0CXR("NAME")="ALR3"
     130        S C0CXR("TYPE")="R"
     131        S C0CXR("USE")="S"
     132        S C0CXR("EXECUTION")="F"
     133        S C0CXR("ACTIVITY")="IR"
     134        S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result - any patient"
     135        S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes that has been assigned to a lab result. Allows queries"
     136        S C0CXR("DESCR",2)="to retrieve the LOINC code associated with a specific test result. It allows any patient"
     137        S C0CXR("DESCR",3)="lab results to be identified by LOINC"
     138        S C0CXR("VAL",1)=1113
     139        S C0CXR("VAL",1,"SUBSCRIPT")=1
     140        S C0CXR("VAL",1,"COLLATION")="F"
     141        ;
     142        D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
     143        ;
     144        Q
     145        ;
     146        ;
     147ALR4    ; Installation of ALR4 cross-reference
     148        ;
     149        N C0CFLAG,C0CXR,C0CRES,C0COUT
     150        ;
     151        S C0CFLAG=""
     152        ;
     153        S C0CXR("FILE")=9000010.09
     154        S C0CXR("NAME")="ALR4"
     155        S C0CXR("TYPE")="R"
     156        S C0CXR("USE")="S"
     157        S C0CXR("EXECUTION")="R"
     158        S C0CXR("ACTIVITY")="IR"
     159        S C0CXR("SHORT DESCR")="X-ref by patient and collection date/time"
     160        S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
     161        S C0CXR("DESCR",2)="patient by collection date/time. This includes results that are only in"
     162        S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
     163        S C0CXR("DESCR",4)="file (#63)."
    144164        S C0CXR("VAL",1)=.02
    145165        S C0CXR("VAL",1,"SUBSCRIPT")=1
     
    148168        S C0CXR("VAL",2,"SUBSCRIPT")=2
    149169        S C0CXR("VAL",2,"COLLATION")="F"
    150         S C0CXR("VAL",3)=.06
    151         S C0CXR("VAL",3,"SUBSCRIPT")=3
    152         S C0CXR("VAL",3,"COLLATION")="F"
    153         S C0CXR("VAL",4)=.01
    154         S C0CXR("VAL",4,"SUBSCRIPT")=4
    155         S C0CXR("VAL",4,"COLLATION")="F"
    156         S C0CXR("VAL",5)=1113
    157         S C0CXR("VAL",5,"SUBSCRIPT")=5
    158         S C0CXR("VAL",5,"COLLATION")="F"
    159         D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
    160         ;
    161         Q
    162         ;
    163         ;
    164 ALR4    ;
    165         ;
    166         N C0CFLAG,C0CXR,C0CRES,C0COUT
    167         ;
    168         S C0CFLAG="S"
    169         I '$D(ZTQUEUED) S C0CFLAG=COCFLAG_"W"
    170         ;
    171         S C0CXR("FILE")=9000010.09
    172         S C0CXR("NAME")="ALR2"
    173         S C0CXR("TYPE")="MU"
    174         S C0CXR("USE")="S"
    175         S C0CXR("EXECUTION")="R"
    176         S C0CXR("ACTIVITY")="IR"
    177         S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result."
    178         S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes"
    179         S C0CXR("DESCR",2)="that has been assigned to a lab result. Allows queries to"
    180         S C0CXR("DESCR",3)="retrieve the LOINC code associated with a specific test"
    181         S C0CXR("DESCR",4)="result."
    182         S C0CXR("SET")="S ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)="""""
    183         S C0CXR("KILL")="K ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)"
    184         S C0CXR("WHOLE KILL")="K ^AUPNVLAB(""ALR2"")"
    185         S C0CXR("VAL",1)=.02
    186         S C0CXR("VAL",1,"SUBSCRIPT")=1
    187         S C0CXR("VAL",1,"COLLATION")="F"
    188         S C0CXR("VAL",2)=1201
    189         S C0CXR("VAL",2,"SUBSCRIPT")=2
    190         S C0CXR("VAL",2,"COLLATION")="F"
    191         S C0CXR("VAL",3)=.06
    192         S C0CXR("VAL",3,"SUBSCRIPT")=3
    193         S C0CXR("VAL",3,"COLLATION")="F"
    194         S C0CXR("VAL",4)=.01
    195         S C0CXR("VAL",4,"SUBSCRIPT")=4
    196         S C0CXR("VAL",4,"COLLATION")="F"
    197         S C0CXR("VAL",5)=1113
    198         S C0CXR("VAL",5,"SUBSCRIPT")=5
    199         S C0CXR("VAL",5,"COLLATION")="F"
    200         D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
    201         ;
    202         Q
    203         ;
    204         ;
    205 ALR5    ;
    206         ;
    207         N C0CFLAG,C0CXR,C0CRES,C0COUT
    208         ;
    209         S C0CFLAG="S"
    210         I '$D(ZTQUEUED) S C0CFLAG=COCFLAG_"W"
    211         ;
    212         S C0CXR("FILE")=9000010.09
    213         S C0CXR("NAME")="ALR2"
    214         S C0CXR("TYPE")="MU"
    215         S C0CXR("USE")="S"
    216         S C0CXR("EXECUTION")="R"
    217         S C0CXR("ACTIVITY")="IR"
    218         S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result."
    219         S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes"
    220         S C0CXR("DESCR",2)="that has been assigned to a lab result. Allows queries to"
    221         S C0CXR("DESCR",3)="retrieve the LOINC code associated with a specific test"
    222         S C0CXR("DESCR",4)="result."
    223         S C0CXR("SET")="S ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)="""""
    224         S C0CXR("KILL")="K ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)"
    225         S C0CXR("WHOLE KILL")="K ^AUPNVLAB(""ALR2"")"
    226         S C0CXR("VAL",1)=.02
    227         S C0CXR("VAL",1,"SUBSCRIPT")=1
    228         S C0CXR("VAL",1,"COLLATION")="F"
    229         S C0CXR("VAL",2)=1201
    230         S C0CXR("VAL",2,"SUBSCRIPT")=2
    231         S C0CXR("VAL",2,"COLLATION")="F"
    232         S C0CXR("VAL",3)=.06
    233         S C0CXR("VAL",3,"SUBSCRIPT")=3
    234         S C0CXR("VAL",3,"COLLATION")="F"
    235         S C0CXR("VAL",4)=.01
    236         S C0CXR("VAL",4,"SUBSCRIPT")=4
    237         S C0CXR("VAL",4,"COLLATION")="F"
    238         S C0CXR("VAL",5)=1113
    239         S C0CXR("VAL",5,"SUBSCRIPT")=5
    240         S C0CXR("VAL",5,"COLLATION")="F"
    241         D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
    242         ;
    243         Q
     170        ;
     171        D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
     172        ;
     173        Q
     174        ;
     175        ;
     176ALR5    ; Installation of ALR5 cross-reference
     177        ;
     178        N C0CFLAG,C0CXR,C0CRES,C0COUT
     179        ;
     180        S C0CFLAG=""
     181        ;
     182        S C0CXR("FILE")=9000010.09
     183        S C0CXR("NAME")="ALR5"
     184        S C0CXR("TYPE")="R"
     185        S C0CXR("USE")="S"
     186        S C0CXR("EXECUTION")="R"
     187        S C0CXR("ACTIVITY")="IR"
     188        S C0CXR("SHORT DESCR")="X-ref by patient and results availble date/time"
     189        S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
     190        S C0CXR("DESCR",2)="patient by results available date/time. This includes results that are only in"
     191        S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
     192        S C0CXR("DESCR",4)="file (#63)."
     193        S C0CXR("VAL",1)=.02
     194        S C0CXR("VAL",1,"SUBSCRIPT")=1
     195        S C0CXR("VAL",1,"COLLATION")="F"
     196        S C0CXR("VAL",2)=1212
     197        S C0CXR("VAL",2,"SUBSCRIPT")=2
     198        S C0CXR("VAL",2,"COLLATION")="F"
     199        ;
     200        D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
     201        ;
     202        Q
     203        ;
     204        ;
     205REINDEX ; Set data into indexes for current entries.
     206        ;
     207        ;
     208        N %,C0CNT,DA,DIK,MSG
     209        ;
     210        S (C0CNT,DA)=0
     211        S DIK="^AUPNVLAB("
     212        S DIK(1)=".02^ALR1^ALR2^ALR4^ALR5"
     213        ;
     214        ; Create checkpoint
     215        S %=$$NEWCP^XPDUTL("RPMS7","","")
     216        ;
     217        ; Retrieve checkpoint value if previously saved
     218        S %=$$PARCP^XPDUTL("RPMS7","")
     219        I %'="" S DA=%
     220        ;
     221        S MSG="Starting indexing of ALR1, ALR2, ALR4, ALR5 indexes"
     222        D BMES(MSG)
     223        ;
     224        I DA'="END" D
     225        . F  S DA=$O(^AUPNVLAB(DA)) Q:DA<1  D
     226        . . D EN1^DIK
     227        . . S C0CNT=C0CNT+1
     228        . . I (C0CNT#100)=0 S %=$$UPCP^XPDUTL("RPMS7",DA)
     229        S %=$$UPCP^XPDUTL("RPMS7","END")
     230        ;
     231        S MSG="Finished indexing of ALR1, ALR2, ALR4, ALR5 indexes"
     232        D BMES(MSG)
     233        ;
     234        K DA,DIK
     235        ;
     236        S (C0CNT,DA)=0
     237        S DIK="^AUPNVLAB("
     238        S DIK(1)="1113^ALR3"
     239        ;
     240        ; Create checkpoint
     241        S %=$$NEWCP^XPDUTL("RPMS8","","")
     242        ;
     243        ; Retrieve checkpoint value if previously saved
     244        S %=$$PARCP^XPDUTL("RPMS8","")
     245        I %'="" S DA=%
     246        ;
     247        S MSG="Starting indexing of ALR3 index"
     248        D BMES(MSG)
     249        ;
     250        I DA'="END" D
     251        . F  S DA=$O(^AUPNVLAB(DA)) Q:DA<1  D
     252        . . D EN1^DIK
     253        . . S C0CNT=C0CNT+1
     254        . . I (C0CNT#100)=0 S %=$$UPCP^XPDUTL("RPMS8",DA)
     255        S %=$$UPCP^XPDUTL("RPMS8","END")
     256        ;
     257        S MSG="Finished indexing of ALR3 index"
     258        D BMES(MSG)
     259        ;
     260        ;
     261        Q
     262        ;
     263        ;
     264BMES(STR) ; Write BMES^XPDUTL statements
     265        ;
     266        D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
     267        ;
     268        Q
Note: See TracChangeset for help on using the changeset viewer.