YSP77I ; SLC/PKR - Create cross-references. ;10/12/2004
 ;;5.01;MENTAL HEALTH;**77**;Dec 30, 1994
 ;
 Q
CMH ;Create cross-reference for Psych Instrument Patient File.
 N MSG,RESULT,XREF
 D BMES^XPDUTL("Creating Mental Health cross-reference.")
 S XREF("FILE")=601.2
 S XREF("ROOT FILE")=601.22
 S XREF("TYPE")="MU"
 S XREF("SHORT DESCR")="Clinical Reminders cross-reference."
 S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
 S XREF("DESCR",2)="all patients with a particular mental health instrument and one for finding all"
 S XREF("DESCR",3)="the mental health instruments a patient has."
 S XREF("DESCR",4)="The index is stored in the Clinical Reminders index global as:"
 S XREF("DESCR",5)=" ^PXRMINDX(601.2,""IP"",INSTRUMENT,DFN,COMPLETION DATE,DAS)"
 S XREF("DESCR",6)=" ^PXRMINDX(601.2,""PI"",DFN,INSTRUMENT,COMPLETION DATE,DAS)"
 S XREF("DESCR",7)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
 S XREF("USE")="ACTION"
 S XREF("EXECUTION")="R"
 S XREF("ACTIVITY")="IR"
 S XREF("WHOLE KILL")="K ^PXRMINDX(601.2)"
 S XREF("VAL",1)=.01
 S XREF("VAL",1,"SUBSCRIPT")=1
 S XREF("NAME")="ACR"
 S XREF("SET")="D SMH^YTPXRM(.X,.DA)"
 S XREF("KILL")="D KMH^YTPXRM(.X,.DA)"
 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
 Q
 ;
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HYSP77I   1373     printed  Sep 23, 2025@19:50:58                                                                                                                                                                                                      Page 2
YSP77I    ; SLC/PKR - Create cross-references. ;10/12/2004
 +1       ;;5.01;MENTAL HEALTH;**77**;Dec 30, 1994
 +2       ;
 +3        QUIT 
CMH       ;Create cross-reference for Psych Instrument Patient File.
 +1        NEW MSG,RESULT,XREF
 +2        DO BMES^XPDUTL("Creating Mental Health cross-reference.")
 +3        SET XREF("FILE")=601.2
 +4        SET XREF("ROOT FILE")=601.22
 +5        SET XREF("TYPE")="MU"
 +6        SET XREF("SHORT DESCR")="Clinical Reminders cross-reference."
 +7        SET XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
 +8        SET XREF("DESCR",2)="all patients with a particular mental health instrument and one for finding all"
 +9        SET XREF("DESCR",3)="the mental health instruments a patient has."
 +10       SET XREF("DESCR",4)="The index is stored in the Clinical Reminders index global as:"
 +11       SET XREF("DESCR",5)=" ^PXRMINDX(601.2,""IP"",INSTRUMENT,DFN,COMPLETION DATE,DAS)"
 +12       SET XREF("DESCR",6)=" ^PXRMINDX(601.2,""PI"",DFN,INSTRUMENT,COMPLETION DATE,DAS)"
 +13       SET XREF("DESCR",7)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
 +14       SET XREF("USE")="ACTION"
 +15       SET XREF("EXECUTION")="R"
 +16       SET XREF("ACTIVITY")="IR"
 +17       SET XREF("WHOLE KILL")="K ^PXRMINDX(601.2)"
 +18       SET XREF("VAL",1)=.01
 +19       SET XREF("VAL",1,"SUBSCRIPT")=1
 +20       SET XREF("NAME")="ACR"
 +21       SET XREF("SET")="D SMH^YTPXRM(.X,.DA)"
 +22       SET XREF("KILL")="D KMH^YTPXRM(.X,.DA)"
 +23       DO CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
 +24       IF RESULT=""
               DO DCERRMSG^PXRMP12I(.MSG,.XREF)
 +25       QUIT 
 +26      ;