Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OROTHCL

OROTHCL.m

Go to the documentation of this file.
  1. OROTHCL ;SLC/SS/RM - OTHD CLOCK INTERFACE ; 06/13/19 09:11
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;**377,437**;Dec 17, 1997;Build 29
  1. ;
  1. ;
  1. ;Functionality:
  1. ;This function is called from the "OROTHCL GET" RPC to retrieve
  1. ; OTH (Other Than Honorable) status,
  1. ; PP (Presumptive Psychosis) status,
  1. ; PRF (Patient Record Flag) and its history
  1. ; as a text to display in OTH/PP/inactive PRF history button and associated pop-up message in CPRS.
  1. ;
  1. ;The OR code below calls DG API OTHBTN^DGOTHBTN to get text lines to display in CPRS,
  1. ;it works in conjunction with Registration patches: DG*5.3*952, DG*5.3*977, DG*5.3*1029
  1. ;
  1. ;ICR:
  1. ; Supports the ICR# 6873
  1. ; between DG (custodial) and OR (subscriber) namespaces
  1. ;
  1. ;Input parameters:
  1. ; RET - reference type parameter to return data
  1. ; DFN - patient's IEN in the file (#2)
  1. ; ORDATE - the date to calculate status and compose the text to display to CPRS
  1. ; default = DT (today)
  1. ;
  1. ;Return array:
  1. ;If RET(0)<0 : error code less than zero^error message - it is an error, and do not display anything
  1. ;
  1. ;If RET(0)=0 : then do not display anything in CPRS
  1. ;
  1. ;If RET(0)>0 : see the description below:
  1. ;
  1. ;RET(0) = number of lines to return
  1. ;RET(1) = text for the 1st line on the button ^Text to display when hover over the 1st line on the button
  1. ;RET(2) = text for the 2nd line on the button^Text to display when hover over the 2nd line on the button
  1. ;RET(3) = text for the 1st line of the button-click popup message ^ Text for the 1st line of the warning popup message (see the example for the OTH-90 below)
  1. ;RET(>3)= text lines for the rest of the text in the popup message when the user clicks on the button or for the warning popup message
  1. ;NOTE: empty or null values in array elements greater than 3 will not be displayed on the CPRS side.
  1. ; Enter at least a blank space in the piece to include a blank line in the displayed text.
  1. ;
  1. ;Example for OTH-EXT:
  1. ;RET(0)=6
  1. ;RET(1)="OTH-EXT^Other than Honorable, click for details"
  1. ;RET(2)=" "
  1. ;RET(3)="Other than Honorable - Extended"
  1. ;RET(4)="Eligible for Mental Health care only"
  1. ;RET(5)="Not time limited - pending VBA adjudication"
  1. ;RET(6)="Adjudication will determine eligibility for continuing care"
  1. ;
  1. ;Example for OTH-90 with zero days remaining:
  1. ;RET(0)=10
  1. ;RET(1)="OTH^Other than Honorable, click for details"
  1. ;RET(2)="0D,P1^Zero days remaining in the most recent period"
  1. ;RET(3)="Other Than Honorable Status"
  1. ;RET(4)=" "
  1. ;RET(5)="Zero days remaining in the most recent period^WARNING: EMERGENT MH OTH"
  1. ;RET(6)="^Zero days remaining in the most recent period."
  1. ;RET(7)="^Authorization from VISN Chief Medical Officer is required for an additional 90-Day period."
  1. ;RET(8)=" "
  1. ;RET(9)="Call Registration team for details."
  1. ;RET(10)="Clinician: Determine and document in 1st line of Progress Note if MH treatment related to service."
  1. ;
  1. ;Example for OTH-90 with less than 7 days remaining:
  1. ;RET(0)=10
  1. ;RET(1)="OTH^Other than Honorable, click for details"
  1. ;RET(2)="5D,P1^5 day(s) remaining in the current period"
  1. ;RET(3)="Other Than Honorable Status"
  1. ;RET(4)=" "
  1. ;RET(5)="5 day(s) remaining in the current period^WARNING: EMERGENT MH OTH"
  1. ;RET(6)="^Less than 7 day(s) remaining in the current period."
  1. ;RET(7)="^Authorization from VISN Chief Medical Officer is required for an additional 90-Day period."
  1. ;RET(8)=" "
  1. ;RET(9)="Call Registration team for details."
  1. ;RET(10)="Clinician: Determine and document in 1st line of Progress Note if MH treatment related to service."
  1. ;
  1. ;Example for OTH-90 with more than 7 days remaining:
  1. ;RET(0)=8
  1. ;RET(1)="OTH^Other than Honorable, click for details"
  1. ;RET(2)="80D,P1^80 day(s) remaining in the current period"
  1. ;RET(3)="Other Than Honorable Status"
  1. ;RET(4)=" "
  1. ;RET(5)="80 day(s) remaining in the current period"
  1. ;RET(6)=" "
  1. ;RET(7)="Call Registration team for details."
  1. ;RET(8)="Clinician: Determine and document in 1st line of Progress Note if MH treatment related to service."
  1. ;
  1. ;Example for PP workaround settings only:
  1. ;RET(0)=7
  1. ;RET(1)="PP^Presumptive Psychosis Authority, click for details"
  1. ;RET(2)="^"
  1. ;RET(3)="Eligible for mental health care only under Presumptive Psychosis"
  1. ;RET(4)="Authority."
  1. ;RET(5)="PP Category: No value was selected as PP Indicator is not completed."
  1. ;RET(6)="Patients who experienced MST are eligible for MST related mental"
  1. ;RET(7)="health and medical care."
  1. ;
  1. ;Example for PP workaround settings and PP category:
  1. ;RET(0)=7
  1. ;RET(1)="PP^Presumptive Psychosis Authority, click for details"
  1. ;RET(2)="Fsm^Former Service Member with prior OTH discharge; should now be post-adjudication."
  1. ;RET(3)="Eligible for mental health care only under Presumptive Psychosis"
  1. ;RET(4)="Authority: Former Service Member with prior OTH discharge;"
  1. ;RET(5)="should now be post-adjudication."
  1. ;RET(6)="Patients who experienced MST may be eligible for MST-related care;"
  1. ;RET(7)="check with Eligibility for specifics."
  1. ;
  1. ;Example for PP category without PP workaround settings (the mailman will be also sent to the DGEN ELIGIBILITY ALERT group in DGOTHBT2):
  1. ;RET(0)=6
  1. ;RET(1)="PP^Presumptive Psychosis Authority, click for details"
  1. ;RET(2)="Dec^VETERAN DECLINES ENROLLMENT"
  1. ;RET(3)="Eligible for mental health care only under Presumptive Psychosis"
  1. ;RET(4)="Authority: VETERAN DECLINES ENROLLMENT."
  1. ;RET(5)="Patients who experienced MST are eligible for MST related mental"
  1. ;RET(6)="health and medical care."
  1. ;
  1. ;Example for inactive PRFs:
  1. ;RET(0)=23
  1. ;RET(1)="Inactive Flag^Patient has Inactive Flag(s), click to view"
  1. ;RET(2)=" "
  1. ;RET(3)="Flag name: HIGH RISK FOR SUICIDE Status: INACTIVE"
  1. ;RET(4)=" Initial Assigned Date: OCT 12, 2020@16:27:10"
  1. ;RET(5)=" Originating Site: CAMP MASTER"
  1. ;RET(6)=" Owner Site: CAMP MASTER"
  1. ;RET(7)=" CAMP MASTER changes:"
  1. ;RET(8)=" DATE/TIME: NOV 25, 2020@10:45:44 ACTION: INACTIVATE"
  1. ;RET(9)=" BAY PINES VAMC changes:"
  1. ;RET(10)=" DATE/TIME: NOV 25, 2020@10:19:17 ACTION: REACTIVATE"
  1. ;RET(11)=" CAMP MASTER changes:"
  1. ;RET(12)=" DATE/TIME: NOV 24, 2020@09:26:06 ACTION: INACTIVATE"
  1. ;RET(13)=" NEW YORK HHS changes:"
  1. ;RET(14)=" DATE/TIME: NOV 24, 2020@09:25:30 ACTION: CONTINUE"
  1. ;RET(15)=" *****additional info is in vista*****"
  1. ;RET(16)=" "
  1. ;RET(17)="Flag name: MISSING PATIENT Status: INACTIVE"
  1. ;RET(18)=" Initial Assigned Date: OCT 12, 2020@16:27:54"
  1. ;RET(19)=" Originating Site: CAMP MASTER"
  1. ;RET(20)=" Owner Site: CAMP MASTER"
  1. ;RET(21)=" CAMP MASTER changes:"
  1. ;RET(22)=" DATE/TIME: DEC 01, 2020@12:06:47 ACTION: INACTIVATE"
  1. ;RET(23)=" *****additional info is in vista*****"
  1. ;
  1. GET(RET,DFN,ORDATE) ;
  1. K RET
  1. ;insert the check for
  1. I $T(OTHBTN^DGOTHBTN)="" S RET(0)="-2^OTHD clock functionality is not available" Q
  1. I $G(DFN)'>0 S RET(0)="-1^patient IEN is not defined" Q
  1. S ORDATE=$S($G(ORDATE)>0:ORDATE,1:DT)
  1. D OTHBTN^DGOTHBTN(DFN,ORDATE,.RET)
  1. Q
  1. ;