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

PXAAVSIT.m

Go to the documentation of this file.
PXAAVSIT ;ISP/LMT - APIs for VISIT (#9000010) ;Aug 29, 2023@08:59
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**238**;Aug 12, 1996;Build 3
 ;
 ; APIs for VISIT (#9000010)
 ;
 ;
GETFIELDS(ARRAY,IEN,FIELDS,EXTERNAL) ;
 K ARRAY
 I $G(IEN)'>0 Q 0
 I '$D(^AUPNVSIT(IEN)) Q 0  ; Exit if no such record.
 ;
 N DIQOUT,FLDNUM,IENS,MSG,FLAG
 S FLAG="I"
 I $G(EXTERNAL) S FLAG="E"
 S IENS=IEN_","
 D GETS^DIQ(9000010,IENS,FIELDS,FLAG,"DIQOUT","MSG")
 I $D(MSG) S ARRAY(1)="Invalid field list." Q -1
 S FLDNUM=0
 F  S FLDNUM=$O(DIQOUT(9000010,IENS,FLDNUM)) Q:FLDNUM=""  D
 . S ARRAY(FLDNUM)=$G(DIQOUT(9000010,IENS,FLDNUM,FLAG))
 Q 1
 ;
 ;
GETFIELD(IEN,FIELD,EXTERNAL) ;
 N IENS,FLAG
 I $G(IEN)'>0 Q ""
 I '$D(^AUPNVSIT(IEN)) Q ""  ; Exit if no such record.
 ;
 S FLAG="I"
 I $G(EXTERNAL) S FLAG="E"
 S IENS=IEN_","
 Q $$GET1^DIQ(9000010,IENS,$G(FIELD),FLAG)
 ;