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

BTIULO9.m

Go to the documentation of this file.
  1. BTIULO9 ;IHS/CIA/MGH - IHS OBJECTS ADDED IN PATCHES FOR BEHAVIORAL HEALTH;09-Feb-2006 15:15;MGH
  1. ;;1.0;TEXT INTEGRATION UTILITIES;**1003,1004**;NOV 04, 2004
  1. ;Patch 1004 added location of home
  1. ;
  1. WORKPH(DFN) ; EP;--
  1. ;Get work phone number
  1. NEW WORK
  1. Q:'$G(DFN)
  1. S WORK=$$GET1^DIQ(2,DFN,.132) S:WORK]"" WORK="Work phone: "_WORK
  1. I WORK="" S WORK="No Phone in record"
  1. Q WORK
  1. OTHERPH(DFN) ;EP;--
  1. ;Get entry in the OTHER PHONE field
  1. NEW OTHER
  1. Q:'$G(DFN)
  1. S OTHER=$$GET1^DIQ(9000001,DFN,1801) S:OTHER]"" OTHER="Other phone: "_OTHER
  1. I OTHER="" S OTHER="No other phone in record"
  1. Q OTHER
  1. EMPLOYER(DFN) ; EP
  1. ;Enter the employer name
  1. N EMP
  1. Q:'$G(DFN)
  1. S EMP=$$GET1^DIQ(9000001,DFN,.19) S:EMP]"" EMP="Employer: "_EMP
  1. I EMP="" S EMP="No employer listed"
  1. Q EMP
  1. EMPSTAT(DFN) ; EP
  1. ;Enter the employment status
  1. N EMPST
  1. Q:'$G(DFN)
  1. S EMPST=$$GET1^DIQ(9000001,DFN,.21) S:EMPST]"" EMPST="Employment Status: "_EMPST
  1. I EMPST="" S EMPST="No employment status listed"
  1. Q EMPST
  1. LOFHOME(DFN,TARGET) ;EP
  1. ;Find the location of home from the IHS patient file
  1. N LOC,CNT,LINE
  1. S CNT=0
  1. S LOC=0 F S LOC=$O(^AUPNPAT(DFN,12,LOC)) Q:LOC="" D
  1. .S CNT=$G(CNT)+1
  1. .I CNT=1 S @TARGET@(1,0)="Location of home: " S CNT=2
  1. .S LINE=$G(^AUPNPAT(DFN,12,LOC,0))
  1. .S @TARGET@(CNT,0)=$$SP(5)_LINE
  1. I '$G(CNT) S @TARGET@(1,0)="No location of home defined"
  1. Q "~@"_$NA(@TARGET)
  1. ;
  1. PAD(DATA,LENGTH) ; -- SUBRTN to pad length of data
  1. Q $E(DATA_$$REPEAT^XLFSTR(" ",LENGTH),1,LENGTH)
  1. ;
  1. SP(NUM) ; -- SUBRTN to pad spaces
  1. Q $$PAD(" ",NUM)