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

PXSMAN.m

Go to the documentation of this file.
  1. PXSMAN ;SLC/PKR - Utilities for working with ScreenMan ;10/24/2016
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**211**;Aug 12, 1996;Build 454
  1. ;=============================================
  1. FSOC(FILENUM,FIELD) ;Format a set of codes for display in ScreenMan.
  1. N CODES,MSG,LEN,NL,TEXTOUT
  1. S CODES=$$GET1^DID(FILENUM,FIELD,"","POINTER","MSG")
  1. S CODES=$TR(CODES,":","=")
  1. S CODES=$$STRREP^PXUTIL(CODES,";",", ")
  1. D FORMATS^PXRMTEXT(1,IOM,CODES,.NL,.TEXTOUT)
  1. S LEN=$L(TEXTOUT(NL))
  1. S:$E(TEXTOUT(NL),LEN)="," TEXTOUT(NL)=$E(TEXTOUT(NL),1,(LEN-1))
  1. D HLP^DDSUTL(.TEXTOUT)
  1. Q
  1. ;
  1. ;=============================================
  1. WPECAP(FNUM,DA,FIELD,MAXLEN) ;Executable caption for word-processing fields.
  1. ;FNUM is the file number and FIELD is the field name. MAXLEN is
  1. ;74-$L(FIELD). Pass it as parameter so it does not need to be
  1. ;constantly recomputed.
  1. N L1,TEXT,WPTEXT
  1. S WPTEXT=$$GET^DDSVAL(FNUM,.DA,FIELD)
  1. S TEXT=FIELD_": "
  1. I $$WPNCHAR^PXSMAN(WPTEXT)=0 Q TEXT
  1. S L1=@WPTEXT@(1,0)
  1. S LEN=$L(L1)
  1. Q TEXT_$S(LEN>MAXLEN:$E(L1,1,MAXLEN)_" ...",1:L1)
  1. ;
  1. ;=============================================
  1. WPNCHAR(WP) ;Return 0 if a word-processing field does not contain any text.
  1. I '$D(@WP@(0)) Q 0
  1. N LN,NC
  1. S NC=0
  1. F LN=1:1:$P(@WP@(0),U,4) Q:NC>0 S NC=NC+$L(@WP@(LN,0))
  1. Q NC
  1. ;
  1. ;=============================================
  1. VUPAGE(FILENUM,UPAGE,DA,DDSERROR) ;Make sure the Upper Age is not less than
  1. ;the Lower Age.
  1. N LWRAGE
  1. S LWRAGE=$$GET^DDSVAL(FILENUM,.DA,"LOWER AGE")
  1. I UPAGE'<LWRAGE Q
  1. D HLP^DDSUTL("The Upper Age cannot be less than the Lower Age.")
  1. S DDSERROR=1
  1. Q
  1. ;