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

PXRMUCUM.m

Go to the documentation of this file.
  1. PXRMUCUM ;SLC/PKR - Utility for UCUM codes. ;04/14/2022
  1. ;;2.0;CLINICAL REMINDERS;**65**;Feb 04, 2005;Build 438
  1. ;
  1. ; API ICR#
  1. ;UCUMDATA^LEXMUCUM 6225
  1. ;
  1. ;===================
  1. UCUMFIELDS(IDEN,FIELDS) ;Given an identifier, which can be an IEN, a
  1. ;Description, or a UCUM and a semicolon separated list of fields return
  1. ;the fields as a semicolon separated string. Return -1 is the UCUM entry
  1. ;does not exist. The fields that can be returned are: COMMENTS, DESCRIPTIION,
  1. ;IEN, ROW, UCUM CODE,
  1. N FIELD,FIELDSTRING,IEN,IND,NFIELDS,UCUMDATA
  1. S NFIELDS=$L(FIELDS,";")
  1. I NFIELDS=0 Q 0
  1. D UCUMDATA^LEXMUCUM(IDEN,.UCUMDATA)
  1. S IEN=$O(UCUMDATA(""))
  1. I $D(UCUMDATA(IEN,"ERROR")) Q -1_";"_UCUMDATA(IEN,"ERROR")
  1. S FIELD=$P(FIELDS,";",1)
  1. S FIELDSTRING=UCUMDATA(IEN,FIELD)
  1. F IND=2:1:NFIELDS D
  1. . S FIELD=$P(FIELDS,";",IND)
  1. . S FIELDSTRING=FIELDSTRING_";"_UCUMDATA(IEN,FIELD)
  1. Q FIELDSTRING
  1. ;
  1. ;===================
  1. UCDHTEXT ;UCUM DISPLAY executable help text.
  1. ;;This field specifies how the units are presented when a measurement is
  1. ;;displayed in CPRS, Clinical Reminders, and Health Summary. When the value
  1. ;;is C, the UCUM Code is displayed when the value is D, the Description is
  1. ;;displayed. When the value is N, no units are displayed.
  1. ;;**End Text**
  1. Q
  1. ;
  1. ;===================
  1. UCDXHELP(FILENUM,DA) ;UCUM DISPLAY executable help.
  1. N DONE,DIR0,IND,TEXT,UCUMDATA,UCUMIEN
  1. S DONE=0
  1. F IND=1:1 Q:DONE D
  1. . S TEXT(IND)=$P($T(UCDHTEXT+IND),";",3)
  1. . I TEXT(IND)="**End Text**" S TEXT(IND)=" ",DONE=1 Q
  1. S IND=IND-1
  1. ;
  1. ;Get the Description and UCUM Code.
  1. S UCUMIEN=$$GET^DDSVAL(FILENUM,DA,223)
  1. I UCUMIEN="" D
  1. . S IND=IND+1,TEXT(IND)="No units have been choosen yet, once they have, the Description and UCUM Code"
  1. . S IND=IND+1,TEXT(IND)="can be displayed to help you decide which to use."
  1. E D
  1. . D UCUMDATA^LEXMUCUM(UCUMIEN,.UCUMDATA)
  1. . S IND=IND+1,TEXT(IND)="The UCUM CODE is: "_UCUMDATA(UCUMIEN,"UCUM CODE")
  1. . S IND=IND+1,TEXT(IND)="The description is: "_UCUMDATA(UCUMIEN,"DESCRIPTION")
  1. ;
  1. D BROWSE^DDBR("TEXT","NR","UCUM DISPLAY field Help")
  1. I $D(DDS) D REFRESH^DDSUTL S DY=IOSL-7,DX=0 X IOXY S $Y=DY,$X=DX
  1. Q
  1. ;