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

ABSPOS6H.m

Go to the documentation of this file.
  1. ABSPOS6H ; IHS/FCS/DRS - Data Entry & Status Disp ;
  1. ;;1.0;PHARMACY POINT OF SALE;**10**;JUN 21, 2001;Build 38
  1. ; continuation of ABSPOS6A:
  1. ; SETLINE, INFOCT, COMMENTS
  1. ;-----------------------------------------------------------------
  1. ;IHS/SD/lwj 3/10/04 patch 10 V1.0
  1. ;Cherokee reported a problem with the selection process
  1. ; on the List Manager screen. The problem was isolated
  1. ; to the occasion when the patient's IEN was less than the
  1. ; number of claims to display. The selection prompt would
  1. ; limit the user to the patient's IEN. (i.e. IEN = 5,
  1. ; select prompt would remain at 5-5 even if there were
  1. ; 100 claims to select from.) The problem was traced
  1. ; to the additional entry:
  1. ; ^TMP("ABSPOS",$J,"VALM","IDX",LINE,INFO("PATIEN"),RXI)
  1. ; While the:
  1. ; ^TMP("ABSPOS",$J,"VALM","IDX",LINE,INFO("PATIENT")
  1. ; entry is setup and used by list manager, the other entry
  1. ; appeared to be bogus and may have been used when the
  1. ; screen was first set up. No other references were made
  1. ; to the "RXI" entry in any of the POS programs, so it was
  1. ; remarked from this routine where it was defined.
  1. ;-------------------------------------------------------------
  1. ;
  1. Q
  1. SETLINE(LINE,PAT,RXI) ;EP - from ABSPOS6I
  1. ; set up given line# in array for given PAT name; R root
  1. ; LINE # in array to set
  1. ; PAT = which patient
  1. ; RXI: if present, set this up as a prescription line
  1. ; if missing, set this up as a patient line
  1. N %,X,INFO D INFO^ABSPOS6B(PAT,$G(RXI)) ; Set INFO(*) array
  1. ;
  1. ; Setting up - common to both patient and prescription lines:
  1. ; X is started; whatever branch you go to will build on X
  1. ;
  1. SETL1 K ^TMP("ABSPOS",$J,"VALM","IDX",LINE) ; indexing for ^VALM2 call
  1. S X=$$SETFLD^VALM1($J(LINE,2),"","LINE NUMBER")
  1. ;
  1. ; Setting up for a prescription line:
  1. ;
  1. SETL2 I $G(RXI) D
  1. .I LINE="" D
  1. . . D IMPOSS^ABSPOSUE("P","TI","LINE null",,"SETL2",$T(+0))
  1. .I INFO("PATIEN")="" D
  1. . . D IMPOSS^ABSPOSUE("P","TI","INFO(""PATIEN"") null",,"SETL2",$T(+0))
  1. .I RXI="" D
  1. . . D IMPOSS^ABSPOSUE("P","TI","RXI null",,"SETL2",$T(+0))
  1. .;
  1. .;IHS/SD/lwj 3/10/04 patch 10 nxt line remrked out
  1. .;S ^TMP("ABSPOS",$J,"VALM","IDX",LINE,INFO("PATIEN"),RXI)=""
  1. .;
  1. .S X=$$SETFLD^VALM1(INFO("DRUG"),X,"PATIENT") ; drug name
  1. .N C S C=INFO("RES") ; this will be either status or result
  1. .; DO INFO also tacked on the prescription number
  1. .S X=$$SETFLD^VALM1(C,X,"COMMENTS")
  1. .I $L(C)>80 S X=$$SETFLD^VALM1($E(C,81,160),X,"COMMENTS 2")
  1. .I $L(C)>160 S X=$$SETFLD^VALM1($E(C,161,$L(C)),X,"COMMENTS 3")
  1. ;
  1. ; Setting up for a patient line:
  1. ;
  1. SETL3 E D
  1. .S ^TMP("ABSPOS",$J,"VALM","IDX",LINE,INFO("PATIEN"))=""
  1. .I INFO("%")=100 S INFO("%")="done"
  1. .E S INFO("%")=" "_$J(INFO("%"),2)_"%"
  1. .S X=$$SETFLD^VALM1(INFO("%"),X,"PERCENT DONE")
  1. .S X=$$SETFLD^VALM1(PAT,X,"PATIENT")
  1. .N C S C=INFO("RES") ;$S(INFO("%")="done":$$COMMENTS,1:INFO("RES"))
  1. .S X=$$SETFLD^VALM1($E(C,1,80),X,"COMMENTS")
  1. .I $L(C)>80 S X=$$SETFLD^VALM1($E(C,81,160),X,"COMMENTS 2")
  1. .I $L(C)>160 S X=$$SETFLD^VALM1($E(C,161,210),X,"COMMENTS 3")
  1. SETL9 D SET^VALM10(LINE,X,LINE)
  1. I $$VISIBLE^ABSPOS6I(LINE) D WRITE^VALM10(LINE)
  1. Q
  1. INFOCT(N) ; how many of these things?
  1. I INFO("COUNT")=1 Q "" ; only one, so we display no count
  1. I N=INFO("COUNT") Q "ALL " ; more than one and they're all this way
  1. Q N_" "
  1. COMMENTS() ; construct the comments based on what's in the INFO array
  1. N %,A,M,X,Y S %="",M=255 ; M = max length
  1. ; start with results
  1. I $O(INFO("RES",""))]"" D ;S %="RESULTS: " D
  1. .S A="" F S A=$O(INFO("RES",A)) Q:A="" D
  1. ..;S X=$P(A,U),Y=$P(A,U,2,$L(A,U)) ; X = result code, Y = text
  1. ..S %=%_$$INFOCT(INFO("RES",A)) ; how many of them
  1. ..;I Y]"" S %=%_Y ; with this status
  1. ..;E S %=%_"result code "_X
  1. ..S %=%_A
  1. ..S %=%_"; "
  1. ..I $L(%)>M S %=$E(%,1,$L(M))
  1. ; tack on statuses
  1. I INFO("%")'="done" D
  1. .S %=%_"STATUS: "
  1. .S A="" F S A=$O(INFO("STAT",A)) Q:A="" D
  1. ..S %=%_$$INFOCT(INFO("STAT",A))_$$STATI^ABSPOSU(A)_"; " ; count,text
  1. ..I $L(%)>M S %=$E(%,1,$L(M))
  1. I %?.E1"; " S %=$E(%,1,253)
  1. Q %
  1. DISPHIST(MSG,HANG) ;EP - DEBUGGING - to record history and pause
  1. Q:'$P($G(^ABSP(9002313.99,1,"ABSPOS6*")),U)
  1. S @DISPHIST=@DISPHIST+1
  1. S @DISPHIST@(@DISPHIST)=MSG
  1. Q:'$G(HANG)!$G(NODISPLY)
  1. D MSG^VALM10(MSG)
  1. HANG HANG
  1. D MSG^VALM10("")
  1. Q