RORP018 ;BPOIFO/CLR POST INSTALL PATCH 18 ;7/25/2012
;;1.5;CLINICAL CASE REGISTRIES;**18**;;Build 25
; This routine uses the following IAs:
;
; #2263 XPAR (supported)
; #10141 XPDUTL (supported)
;*****************************************************************************
;ICD9 Add Other depression
;*****************************************************************************
N RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
S RORENTITY="PKG.CLINICAL CASE REGISTRIES"
S RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
S RORINSTANCE="13::Other Depression"
;delete it first (in case it already exists)
D DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
S RORVALUE="CCR Predefined Report Template"
S RORVALUE(1,0)="<?xml version="_"""1.0"""_" encoding="_"""UTF-8"""_"?>"
S RORVALUE(2,0)="<PARAMS>"
S RORVALUE(3,0)="<ICD9LST>"
S RORVALUE(4,0)="<GROUP ID="_"""OtherDepression"""_">"
S RORVALUE(5,0)="<ICD9 ID="_"""293.83"""_">MOOD DISORDER IN COND CLASS ELSEWHERE</ICD9>"
S RORVALUE(6,0)="<ICD9 ID="_"""296.90"""_">UNSPEC EPISODIC MOOD DISORDER</ICD9>"
S RORVALUE(7,0)="<ICD9 ID="_"""296.99"""_">OTHER SPEC EPISODIC MOOD DISORDER</ICD9>"
S RORVALUE(8,0)="<ICD9 ID="_"""298.0"""_">DEPRESS TYPE PSYCHOSIS</ICD9>"
S RORVALUE(9,0)="<ICD9 ID="_"""300.4"""_">DYSTHYMIC DISORDER</ICD9>"
S RORVALUE(10,0)="<ICD9 ID="_"""301.12"""_">CHR DEPRESs PERSONALITY DISORDER</ICD9>"
S RORVALUE(11,0)="<ICD9 ID="_"""309.0"""_">ADJ DISORDER W DEPRESS MOOD</ICD9>"
S RORVALUE(12,0)="<ICD9 ID="_"""309.1"""_">ADJ REACTION W PROLONG DEPRESs REACTION</ICD9>"
S RORVALUE(13,0)="<ICD9 ID="_"""311."""_">DEPRESS DISORDER, NOT ELSEWHERE CLASS</ICD9>"
S RORVALUE(14,0)="</GROUP>"
S RORVALUE(15,0)="</ICD9LST>"
S RORVALUE(16,0)="<PANELS>"
S RORVALUE(17,0)="<PANEL ID="_"""160"""_"/>"
S RORVALUE(18,0)="</PANELS>"
S RORVALUE(19,0)="</PARAMS>"
;add it
D ADD^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORVALUE,.RORERR)
D BMES^XPDUTL("Adding Other Depression common template...")
;*****************************************************************************
;ICD9 Add Major depression ;
;*****************************************************************************
N RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
S RORENTITY="PKG.CLINICAL CASE REGISTRIES"
S RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
S RORINSTANCE="13::Major Depression"
;delete it first (in case it already exists)
D DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
S RORVALUE="CCR Predefined Report Template"
S RORVALUE(1,0)="<?xml version="_"""1.0"""_" encoding="_"""UTF-8"""_"?>"
S RORVALUE(2,0)="<PARAMS>"
S RORVALUE(3,0)="<ICD9LST>"
S RORVALUE(4,0)="<GROUP ID="_"""MajorDepression"""_">"
S RORVALUE(5,0)="<ICD9 ID="_"""296.20"""_">MAJ DEPRESS AFF DIS, SING EPISODE, UNSPEc DEG</ICD9>"
S RORVALUE(6,0)="<ICD9 ID="_"""296.21"""_">MAJ DEPRESs AFF DIS, SING EPISODE, MILD DEG</ICD9>"
S RORVALUE(7,0)="<ICD9 ID="_"""296.22"""_">MAJ DEPRESS AFF DIS, SING EPISODE, MODERATE DEGR</ICD9>"
S RORVALUE(8,0)="<ICD9 ID="_"""296.23"""_">MAJ DEPRESS AFF DIS, SING EPISODE, SEVERE DEGR, WO MENTION OF PSYCHOTIC BEHAVIOR</ICD9>"
S RORVALUE(9,0)="<ICD9 ID="_"""296.24"""_">MAJ DEPRESS AFF DIS, SING EPISODE, SEVERE DEGR, SPEC AS W PSYCHOTIC BEHAVIOR</ICD9>"
S RORVALUE(10,0)="<ICD9 ID="_"""296.25"""_">MAJ DEPRESS AFF DIS, SING EPISODE, IN PART OR UNSPEC REMISS</ICD9>"
S RORVALUE(11,0)="<ICD9 ID="_"""296.26"""_">MAJ DEPRESS AFF DIS, SING EPISODE, IN FULL REMISS</ICD9>"
S RORVALUE(12,0)="<ICD9 ID="_"""296.30"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, UNSPEC DEGREE</ICD9>"
S RORVALUE(13,0)="<ICD9 ID="_"""296.31"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, MILD DEG</ICD9>"
S RORVALUE(14,0)="<ICD9 ID="_"""296.32"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, MODERATE DEG</ICD9>"
S RORVALUE(15,0)="</GROUP>"
S RORVALUE(16,0)="</ICD9LST>"
S RORVALUE(17,0)="<PANELS>"
S RORVALUE(18,0)="<PANEL ID="_"""160"""_"/>"
S RORVALUE(19,0)="</PANELS>"
S RORVALUE(20,0)="</PARAMS>"
;add it
D ADD^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORVALUE,.RORERR)
D BMES^XPDUTL("Adding Major Depression common template...")
;*****************************************************************************
;ICD9 Delete Depression
;*****************************************************************************
N RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
S RORENTITY="PKG.CLINICAL CASE REGISTRIES"
S RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
S RORINSTANCE="13::Depression"
;delete it
D DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
D BMES^XPDUTL("Deleting Depression common template...")
;*****************************************************************************
;Update to ROR METADATA
;*****************************************************************************
N FILE,IX,ERRCNT,NODE,IENS
N DA,DIK,RORFDA,RORDATA,RORIEN,RORIENS,DIERR
S DA=45,DIK="^ROR(799.2," I $D(^ROR(799.2,45))>0 D ^DIK ;delete if exists
S ERRCNT=0
S RORIEN(1)=45
S RORFDA(799.2,"+1,",.01)=45
S RORFDA(799.2,"+1,",1)=2
F I=1:1:13 S RORDATA=$P($T(META45+I),";",2) Q:RORDATA="" D
. S RORIENS="+"_(I+1)_",+1,"
. S RORFDA(799.22,RORIENS,.01)=$P(RORDATA,U)
. S RORFDA(799.22,RORIENS,.02)=$P(RORDATA,U,2)
. S RORFDA(799.22,RORIENS,2)=$P(RORDATA,U,3)
. S RORFDA(799.22,RORIENS,4)=$P(RORDATA,U,4)
. S RORFDA(799.22,RORIENS,1)=$P(RORDATA,U,5)
. S RORFDA(799.22,RORIENS,6)=$P(RORDATA,U,6)
D UPDATE^DIE(,"RORFDA","RORIEN","RORMSG")
I $D(DIERR) S ERRCNT=ERRCNT+1
I ERRCNT>0 D BMES^XPDUTL("Update to ROR METADATA <<FAILED>>") Q
S FILE=9000010.07
S IX=0 F S IX=$O(^ROR(799.2,FILE,2,IX)) Q:IX'>0 D
. S NODE=$G(^ROR(799.2,FILE,2,IX,0))
. I $P(NODE,U)="POV" D
. . S IENS=IX_","_FILE_","
. . S RORFDA(799.22,IENS,4)="Internal"
. . S RORFDA(799.22,IENS,4.2)="01"
. . D FILE^DIE(,"RORFDA","RORMSG")
. . I $D(DIERR) S ERRCNT=ERRCNT+1
S FILE=9000011
S IX=0 F S IX=$O(^ROR(799.2,FILE,2,IX)) Q:IX'>0 D
. S NODE=$G(^ROR(799.2,FILE,2,IX,0))
. I $P(NODE,U)="DIAGNOSIS" D
. . S IENS=IX_","_FILE_","
. . S RORFDA(799.22,IENS,4)="EI"
. . S RORFDA(799.22,IENS,4.2)="1^.01"
. . D FILE^DIE(,"RORFDA","RORMSG")
. . I $D(DIERR) S ERRCNT=ERRCNT+1
I ERRCNT>0 D BMES^XPDUTL("Update to ROR METADATA <<FAILED>>") Q
E D BMES^XPDUTL("Updating ROR METADATA...")
;******************************************************************************
;Add new entries to the ROR LIST ITEM file (#799.1)
; TEXT^TYPE^REGIEN^CODE
;******************************************************************************
N RORDATA,RORTAG,RORFDA,I,TEXT,TYPE,REGISTRY,CODE,RORERR,ERRCNT
S ERRCNT=0
; add items for auto confirm registries
S REGISTRY=0 F S REGISTRY=$O(^ROR(798.1,"C",1,REGISTRY)) Q:REGISTRY'>0 D
. F I=1:1 S RORDATA=$P($T(LIST+I),";",2) Q:RORDATA="" D
. . S TEXT=$P(RORDATA,"^",1) ;TEXT to add
. . S TYPE=$P(RORDATA,"^",2) ;TYPE to add
. . S CODE=$P(RORDATA,"^",4) ;CODE to add
. . ;don't add if it's already in the global
. . Q:$D(^ROR(799.1,"KEY",TYPE,REGISTRY,CODE))
. . S RORFDA(799.1,"+1,",.01)=TEXT
. . S RORFDA(799.1,"+1,",.02)=TYPE
. . S RORFDA(799.1,"+1,",.03)=REGISTRY
. . S RORFDA(799.1,"+1,",.04)=CODE
. . D UPDATE^DIE(,"RORFDA",,"RORERR")
. . I $D(DIERR) S ERRCNT=ERRCNT+1
I ERRCNT>0 D BMES^XPDUTL("Update to ROR LIST ITEM <<FAILED>>") Q
E D BMES^XPDUTL("Updating ROR LIST ITEM...")
Q
;
;******************************************************************************
; Data to be added to ROR METADATA file (#799.2)
; DATA NAME^CODE^REQUIRED^VALUE TYPE^LOADER API^FIELD NUMBER
;******************************************************************************
META45 ;
;PRINCIPAL DIAGNOSIS^101^1^Internal^1^79
;SECONDARY DIAGNOSIS 1^102^1^Internal^1^79.16
;SECONDARY DIAGNOSIS 2^103^1^Internal^1^79.17
;SECONDARY DIAGNOSIS 3^104^1^Internal^1^79.18
;SECONDARY DIAGNOSIS 4^105^1^Internal^1^79.19
;SECONDARY DIAGNOSIS 5^106^1^Internal^1^79.201
;SECONDARY DIAGNOSIS 6^107^1^Internal^1^79.21
;SECONDARY DIAGNOSIS 7^108^1^Internal^1^79.22
;SECONDARY DIAGNOSIS 8^109^1^Internal^1^79.23
;SECONDARY DIAGNOSIS 9^110^1^Internal^1^79.24
;PRINCIPAL DIAGNOSIS pre 1986^111^1^Internal^1^80
;FACILITY^131^1^Internal^1^3
;SUFFIX^132^1^Internal^1^5
;
;******************************************************************************
; Data to be added to ROR LIST ITEM file (#799.1)
; TEXT^TYPE^REGIEN^CODE
;
;******************************************************************************
LIST ;
;Registry Lab^3^^1
;BMI^5^^1
;MELD^6^^1
;MELD-Na^6^^2
;APRI^6^^3
;FIB-4^6^^4
;Creatinine clearance by Cockcroft-Gault^7^^1
;eGFR by MDRD^7^^2
;eGFR by CKD-EPI^7^^3
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRORP018 8767 printed Dec 13, 2024@01:42:26 Page 2
RORP018 ;BPOIFO/CLR POST INSTALL PATCH 18 ;7/25/2012
+1 ;;1.5;CLINICAL CASE REGISTRIES;**18**;;Build 25
+2 ; This routine uses the following IAs:
+3 ;
+4 ; #2263 XPAR (supported)
+5 ; #10141 XPDUTL (supported)
+6 ;*****************************************************************************
+7 ;ICD9 Add Other depression
+8 ;*****************************************************************************
+9 NEW RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
+10 SET RORENTITY="PKG.CLINICAL CASE REGISTRIES"
+11 SET RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
+12 SET RORINSTANCE="13::Other Depression"
+13 ;delete it first (in case it already exists)
+14 DO DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
+15 SET RORVALUE="CCR Predefined Report Template"
+16 SET RORVALUE(1,0)="<?xml version="_"""1.0"""_" encoding="_"""UTF-8"""_"?>"
+17 SET RORVALUE(2,0)="<PARAMS>"
+18 SET RORVALUE(3,0)="<ICD9LST>"
+19 SET RORVALUE(4,0)="<GROUP ID="_"""OtherDepression"""_">"
+20 SET RORVALUE(5,0)="<ICD9 ID="_"""293.83"""_">MOOD DISORDER IN COND CLASS ELSEWHERE</ICD9>"
+21 SET RORVALUE(6,0)="<ICD9 ID="_"""296.90"""_">UNSPEC EPISODIC MOOD DISORDER</ICD9>"
+22 SET RORVALUE(7,0)="<ICD9 ID="_"""296.99"""_">OTHER SPEC EPISODIC MOOD DISORDER</ICD9>"
+23 SET RORVALUE(8,0)="<ICD9 ID="_"""298.0"""_">DEPRESS TYPE PSYCHOSIS</ICD9>"
+24 SET RORVALUE(9,0)="<ICD9 ID="_"""300.4"""_">DYSTHYMIC DISORDER</ICD9>"
+25 SET RORVALUE(10,0)="<ICD9 ID="_"""301.12"""_">CHR DEPRESs PERSONALITY DISORDER</ICD9>"
+26 SET RORVALUE(11,0)="<ICD9 ID="_"""309.0"""_">ADJ DISORDER W DEPRESS MOOD</ICD9>"
+27 SET RORVALUE(12,0)="<ICD9 ID="_"""309.1"""_">ADJ REACTION W PROLONG DEPRESs REACTION</ICD9>"
+28 SET RORVALUE(13,0)="<ICD9 ID="_"""311."""_">DEPRESS DISORDER, NOT ELSEWHERE CLASS</ICD9>"
+29 SET RORVALUE(14,0)="</GROUP>"
+30 SET RORVALUE(15,0)="</ICD9LST>"
+31 SET RORVALUE(16,0)="<PANELS>"
+32 SET RORVALUE(17,0)="<PANEL ID="_"""160"""_"/>"
+33 SET RORVALUE(18,0)="</PANELS>"
+34 SET RORVALUE(19,0)="</PARAMS>"
+35 ;add it
+36 DO ADD^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORVALUE,.RORERR)
+37 DO BMES^XPDUTL("Adding Other Depression common template...")
+38 ;*****************************************************************************
+39 ;ICD9 Add Major depression ;
+40 ;*****************************************************************************
+41 NEW RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
+42 SET RORENTITY="PKG.CLINICAL CASE REGISTRIES"
+43 SET RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
+44 SET RORINSTANCE="13::Major Depression"
+45 ;delete it first (in case it already exists)
+46 DO DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
+47 SET RORVALUE="CCR Predefined Report Template"
+48 SET RORVALUE(1,0)="<?xml version="_"""1.0"""_" encoding="_"""UTF-8"""_"?>"
+49 SET RORVALUE(2,0)="<PARAMS>"
+50 SET RORVALUE(3,0)="<ICD9LST>"
+51 SET RORVALUE(4,0)="<GROUP ID="_"""MajorDepression"""_">"
+52 SET RORVALUE(5,0)="<ICD9 ID="_"""296.20"""_">MAJ DEPRESS AFF DIS, SING EPISODE, UNSPEc DEG</ICD9>"
+53 SET RORVALUE(6,0)="<ICD9 ID="_"""296.21"""_">MAJ DEPRESs AFF DIS, SING EPISODE, MILD DEG</ICD9>"
+54 SET RORVALUE(7,0)="<ICD9 ID="_"""296.22"""_">MAJ DEPRESS AFF DIS, SING EPISODE, MODERATE DEGR</ICD9>"
+55 SET RORVALUE(8,0)="<ICD9 ID="_"""296.23"""_">MAJ DEPRESS AFF DIS, SING EPISODE, SEVERE DEGR, WO MENTION OF PSYCHOTIC BEHAVIOR</ICD9>"
+56 SET RORVALUE(9,0)="<ICD9 ID="_"""296.24"""_">MAJ DEPRESS AFF DIS, SING EPISODE, SEVERE DEGR, SPEC AS W PSYCHOTIC BEHAVIOR</ICD9>"
+57 SET RORVALUE(10,0)="<ICD9 ID="_"""296.25"""_">MAJ DEPRESS AFF DIS, SING EPISODE, IN PART OR UNSPEC REMISS</ICD9>"
+58 SET RORVALUE(11,0)="<ICD9 ID="_"""296.26"""_">MAJ DEPRESS AFF DIS, SING EPISODE, IN FULL REMISS</ICD9>"
+59 SET RORVALUE(12,0)="<ICD9 ID="_"""296.30"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, UNSPEC DEGREE</ICD9>"
+60 SET RORVALUE(13,0)="<ICD9 ID="_"""296.31"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, MILD DEG</ICD9>"
+61 SET RORVALUE(14,0)="<ICD9 ID="_"""296.32"""_">MAJ DEPRESS AFF DIS, RECUR EPISODE, MODERATE DEG</ICD9>"
+62 SET RORVALUE(15,0)="</GROUP>"
+63 SET RORVALUE(16,0)="</ICD9LST>"
+64 SET RORVALUE(17,0)="<PANELS>"
+65 SET RORVALUE(18,0)="<PANEL ID="_"""160"""_"/>"
+66 SET RORVALUE(19,0)="</PANELS>"
+67 SET RORVALUE(20,0)="</PARAMS>"
+68 ;add it
+69 DO ADD^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORVALUE,.RORERR)
+70 DO BMES^XPDUTL("Adding Major Depression common template...")
+71 ;*****************************************************************************
+72 ;ICD9 Delete Depression
+73 ;*****************************************************************************
+74 NEW RORVALUE,RORERR,RORENTITY,RORPARAMETER,RORINSTANCE
+75 SET RORENTITY="PKG.CLINICAL CASE REGISTRIES"
+76 SET RORPARAMETER="ROR REPORT PARAMS TEMPLATE"
+77 SET RORINSTANCE="13::Depression"
+78 ;delete it
+79 DO DEL^XPAR(RORENTITY,RORPARAMETER,RORINSTANCE,.RORERR)
+80 DO BMES^XPDUTL("Deleting Depression common template...")
+81 ;*****************************************************************************
+82 ;Update to ROR METADATA
+83 ;*****************************************************************************
+84 NEW FILE,IX,ERRCNT,NODE,IENS
+85 NEW DA,DIK,RORFDA,RORDATA,RORIEN,RORIENS,DIERR
+86 ;delete if exists
SET DA=45
SET DIK="^ROR(799.2,"
IF $DATA(^ROR(799.2,45))>0
DO ^DIK
+87 SET ERRCNT=0
+88 SET RORIEN(1)=45
+89 SET RORFDA(799.2,"+1,",.01)=45
+90 SET RORFDA(799.2,"+1,",1)=2
+91 FOR I=1:1:13
SET RORDATA=$PIECE($TEXT(META45+I),";",2)
if RORDATA=""
QUIT
Begin DoDot:1
+92 SET RORIENS="+"_(I+1)_",+1,"
+93 SET RORFDA(799.22,RORIENS,.01)=$PIECE(RORDATA,U)
+94 SET RORFDA(799.22,RORIENS,.02)=$PIECE(RORDATA,U,2)
+95 SET RORFDA(799.22,RORIENS,2)=$PIECE(RORDATA,U,3)
+96 SET RORFDA(799.22,RORIENS,4)=$PIECE(RORDATA,U,4)
+97 SET RORFDA(799.22,RORIENS,1)=$PIECE(RORDATA,U,5)
+98 SET RORFDA(799.22,RORIENS,6)=$PIECE(RORDATA,U,6)
End DoDot:1
+99 DO UPDATE^DIE(,"RORFDA","RORIEN","RORMSG")
+100 IF $DATA(DIERR)
SET ERRCNT=ERRCNT+1
+101 IF ERRCNT>0
DO BMES^XPDUTL("Update to ROR METADATA <<FAILED>>")
QUIT
+102 SET FILE=9000010.07
+103 SET IX=0
FOR
SET IX=$ORDER(^ROR(799.2,FILE,2,IX))
if IX'>0
QUIT
Begin DoDot:1
+104 SET NODE=$GET(^ROR(799.2,FILE,2,IX,0))
+105 IF $PIECE(NODE,U)="POV"
Begin DoDot:2
+106 SET IENS=IX_","_FILE_","
+107 SET RORFDA(799.22,IENS,4)="Internal"
+108 SET RORFDA(799.22,IENS,4.2)="01"
+109 DO FILE^DIE(,"RORFDA","RORMSG")
+110 IF $DATA(DIERR)
SET ERRCNT=ERRCNT+1
End DoDot:2
End DoDot:1
+111 SET FILE=9000011
+112 SET IX=0
FOR
SET IX=$ORDER(^ROR(799.2,FILE,2,IX))
if IX'>0
QUIT
Begin DoDot:1
+113 SET NODE=$GET(^ROR(799.2,FILE,2,IX,0))
+114 IF $PIECE(NODE,U)="DIAGNOSIS"
Begin DoDot:2
+115 SET IENS=IX_","_FILE_","
+116 SET RORFDA(799.22,IENS,4)="EI"
+117 SET RORFDA(799.22,IENS,4.2)="1^.01"
+118 DO FILE^DIE(,"RORFDA","RORMSG")
+119 IF $DATA(DIERR)
SET ERRCNT=ERRCNT+1
End DoDot:2
End DoDot:1
+120 IF ERRCNT>0
DO BMES^XPDUTL("Update to ROR METADATA <<FAILED>>")
QUIT
+121 IF '$TEST
DO BMES^XPDUTL("Updating ROR METADATA...")
+122 ;******************************************************************************
+123 ;Add new entries to the ROR LIST ITEM file (#799.1)
+124 ; TEXT^TYPE^REGIEN^CODE
+125 ;******************************************************************************
+126 NEW RORDATA,RORTAG,RORFDA,I,TEXT,TYPE,REGISTRY,CODE,RORERR,ERRCNT
+127 SET ERRCNT=0
+128 ; add items for auto confirm registries
+129 SET REGISTRY=0
FOR
SET REGISTRY=$ORDER(^ROR(798.1,"C",1,REGISTRY))
if REGISTRY'>0
QUIT
Begin DoDot:1
+130 FOR I=1:1
SET RORDATA=$PIECE($TEXT(LIST+I),";",2)
if RORDATA=""
QUIT
Begin DoDot:2
+131 ;TEXT to add
SET TEXT=$PIECE(RORDATA,"^",1)
+132 ;TYPE to add
SET TYPE=$PIECE(RORDATA,"^",2)
+133 ;CODE to add
SET CODE=$PIECE(RORDATA,"^",4)
+134 ;don't add if it's already in the global
+135 if $DATA(^ROR(799.1,"KEY",TYPE,REGISTRY,CODE))
QUIT
+136 SET RORFDA(799.1,"+1,",.01)=TEXT
+137 SET RORFDA(799.1,"+1,",.02)=TYPE
+138 SET RORFDA(799.1,"+1,",.03)=REGISTRY
+139 SET RORFDA(799.1,"+1,",.04)=CODE
+140 DO UPDATE^DIE(,"RORFDA",,"RORERR")
+141 IF $DATA(DIERR)
SET ERRCNT=ERRCNT+1
End DoDot:2
End DoDot:1
+142 IF ERRCNT>0
DO BMES^XPDUTL("Update to ROR LIST ITEM <<FAILED>>")
QUIT
+143 IF '$TEST
DO BMES^XPDUTL("Updating ROR LIST ITEM...")
+144 QUIT
+145 ;
+146 ;******************************************************************************
+147 ; Data to be added to ROR METADATA file (#799.2)
+148 ; DATA NAME^CODE^REQUIRED^VALUE TYPE^LOADER API^FIELD NUMBER
+149 ;******************************************************************************
META45 ;
+1 ;PRINCIPAL DIAGNOSIS^101^1^Internal^1^79
+2 ;SECONDARY DIAGNOSIS 1^102^1^Internal^1^79.16
+3 ;SECONDARY DIAGNOSIS 2^103^1^Internal^1^79.17
+4 ;SECONDARY DIAGNOSIS 3^104^1^Internal^1^79.18
+5 ;SECONDARY DIAGNOSIS 4^105^1^Internal^1^79.19
+6 ;SECONDARY DIAGNOSIS 5^106^1^Internal^1^79.201
+7 ;SECONDARY DIAGNOSIS 6^107^1^Internal^1^79.21
+8 ;SECONDARY DIAGNOSIS 7^108^1^Internal^1^79.22
+9 ;SECONDARY DIAGNOSIS 8^109^1^Internal^1^79.23
+10 ;SECONDARY DIAGNOSIS 9^110^1^Internal^1^79.24
+11 ;PRINCIPAL DIAGNOSIS pre 1986^111^1^Internal^1^80
+12 ;FACILITY^131^1^Internal^1^3
+13 ;SUFFIX^132^1^Internal^1^5
+14 ;
+15 ;******************************************************************************
+16 ; Data to be added to ROR LIST ITEM file (#799.1)
+17 ; TEXT^TYPE^REGIEN^CODE
+18 ;
+19 ;******************************************************************************
LIST ;
+1 ;Registry Lab^3^^1
+2 ;BMI^5^^1
+3 ;MELD^6^^1
+4 ;MELD-Na^6^^2
+5 ;APRI^6^^3
+6 ;FIB-4^6^^4
+7 ;Creatinine clearance by Cockcroft-Gault^7^^1
+8 ;eGFR by MDRD^7^^2
+9 ;eGFR by CKD-EPI^7^^3