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

PXAPIIM2.m

Go to the documentation of this file.
PXAPIIM2 ;ISP/LMT - PCE Immunization APIs Cont. ;Aug 16, 2023@14:04
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**217,236**;Aug 12, 1996;Build 17
 ;
 ;
 Q
 ;
IMMGRP(PXRESULT,PXIMM,PXSKIPNOTLIMITED) ; called from IMMGRP^PXAPIIM
 N PXCODE,PXCVX,PXICRIEN,PXICRNAME,PXIMMB,PXNAME,PXVGIEN,PXVGNAME
 ;
 I '$G(PXIMM) Q
 S PXSKIPNOTLIMITED=+$G(PXSKIPNOTLIMITED)
 ;
 S PXNAME=$P($G(^AUTTIMM(PXIMM,0)),U,1)
 ;
 S PXCVX=$P($G(^AUTTIMM(PXIMM,0)),U,3)
 I PXCVX'="" D
 . S PXIMMB=0
 . F  S PXIMMB=$O(^AUTTIMM("C",PXCVX,PXIMMB)) Q:'PXIMMB  D
 . . S PXNAME=$P($G(^AUTTIMM(PXIMMB,0)),U,1)
 . . S PXRESULT("CVX",PXCVX,PXIMMB)=PXNAME
 ;
 S PXVGIEN=0
 F  S PXVGIEN=$O(^AUTTIMM(PXIMM,7,PXVGIEN)) Q:'PXVGIEN  D
 . S PXVGNAME=$P($G(^AUTTIMM(PXIMM,7,PXVGIEN,0)),U,1)
 . I PXVGNAME="" Q
 . S PXIMMB=0
 . F  S PXIMMB=$O(^AUTTIMM("I",PXVGNAME,PXIMMB)) Q:'PXIMMB  D
 . . S PXNAME=$P($G(^AUTTIMM(PXIMMB,0)),U,1)
 . . S PXRESULT("VG",PXVGNAME,PXIMMB)=PXNAME
 ;
 S PXICRIEN=0
 F  S PXICRIEN=$O(^PXV(920.4,PXICRIEN)) Q:'PXICRIEN  D
 . S PXICRNAME=$P($G(^PXV(920.4,PXICRIEN,0)),U,1)
 . ;
 . ; If this imm is listed in the Immunizations Limited To
 . ; multiple, include it
 . I $O(^PXV(920.4,PXICRIEN,3,"B",PXIMM,0)) D  Q
 . . S PXRESULT("ICR",PXICRIEN_";PXV(920.4,")=PXICRNAME
 . ;
 . I PXSKIPNOTLIMITED Q
 . ; Include all contras that don't have the Immunizations
 . ; Limited To multiple populated, except Severe Reaction
 . ; Previous Dose
 . I '$O(^PXV(920.4,PXICRIEN,3,0)) D  Q
 . . S PXCODE=$P($G(^PXV(920.4,PXICRIEN,0)),U,2)
 . . I (PXICRNAME="SEVERE REACTION PREVIOUS DOSE")!(PXCODE="VXC20") Q
 . . S PXRESULT("ICR",PXICRIEN_";PXV(920.4,")=PXICRNAME
 ;
 Q