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

APCDAPI4.m

Go to the documentation of this file.
  1. APCDAPI4 ; IHS/CMI/LAB - & HMW - PCC API FOR RPMS ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ; REQUIRES PIMS VERSION 5.3 PATCH 1002
  1. ;
  1. GETVISIT(APCDIN,APCDOUT) ;PEP - API for PCC visit Creation by RPMS applications
  1. ;
  1. ; >> See details in PIMS Technical Manual (released as appendix with patch 1003)
  1. ; or in SAC Developers' Handbook
  1. ;
  1. ; >> All date/time variables must be in FileMan internal format
  1. ;
  1. ; Special Incoming Variables:
  1. ; APCDIN("FORCE ADD") = 1 ; no matter what, create new visit (Optional)
  1. ; APCDIN ("NEVER ADD") = 1 ; never add visit, just try to find one or more (Optional)
  1. ; APCDIN("ANCILLARY") = 1 ; for ancillary packages to create noon visit if no match found (Optional)
  1. ;
  1. ; Incoming Variables used in Matching: REQUIRED
  1. ; APCDIN("PAT") = patient IEN (file 2 or 9000001)
  1. ; APCDIN("VISIT DATE") = visit date & time (same as check-in date & time)
  1. ; APCDIN ("SITE") = location of encounter IEN (file 4 or 9999999.06)
  1. ; APCDIN("VISIT TYPE") = internal value for field .03 in Visit file
  1. ; APCDIN("SRV CAT") = internal value for service category
  1. ; APCDIN("TIME RANGE") = # ; range in minutes for matching on visit time; REQUIRED unless FORCE ADD set
  1. ; ; zero=exact matches only; -1=don't match on time
  1. ;
  1. ; These are used to match if sent (Optional)
  1. ; APCDIN("PROVIDER") = IEN for provider to match from file 200
  1. ; APCDIN("CLINIC CODE") = IEN of clinic stop code (file 40.7)
  1. ; APCDIN("HOS LOC") = IEN of hospital location (file 44)
  1. ;
  1. ; Incoming Variables used in creating appt and visit
  1. ; APCDIN("APPT DATE") = appt date & time (Required for scheduled appts and walk-ins; check-in will be performed)
  1. ; APCDIN("USR") = user IEN in file 200; REQUIRED
  1. ; APCDIN("OPT") = name for Option Used To Create field (Optional)
  1. ; APCDIN("OI") = reason for appointment; for walk-ins (Optional)
  1. ;
  1. ; Incoming PCC variables for adding additional info to visit (Optional)
  1. ; APCDIN("APCDTPB") = Third Party Billed (#.04)
  1. ; APCDIN("APCDPVL") = Parent Visit Link (#.12)
  1. ; APCDIN("APCDAPPT" = WalkIn/Appt (#.16)
  1. ; APCDIN("APCDEVM") = Evaluation and Management Code (#.17)
  1. ; APCDIN("APCDCODT") = Check Out Date & Time (#.18)
  1. ; APCDIN("APCDLS") = Level of Service -PCC Form (#.19).
  1. ; APCDIN("APCDVELG") = Eligibility (#.21)
  1. ; APCDIN("APCDPROT") = Protocol (#.25).
  1. ; APCDIN("APCDOPT") = Option Used To Create (#.24) ;IHS/OIT/LJF 09/15/2005 PATCH 1004
  1. ; APCDIN("APCDOLOC") = Outside Location (#2101) ;IHS/OIT/LJF 12/21/2005 PATCH 1005
  1. ; Outgoing Array:
  1. ; APCDOUT(0) always set; if = 0 none found and may have error message in 2nd piece
  1. ; if = 1 and APCDOUT(visit ien)="ADD" new visit just created
  1. ; if = 1 and APCDOUT(visit ien)=#; # is time difference in minutes
  1. ; if >1, multiple APCDOUT(visit ien) entries exist
  1. ;
  1. I '$L($T(VISIT^BSDV)) S APCDOUT(0)="0^PIMS version 5.3 must be installed" Q
  1. I '$L($T(GETVISIT^BSDAPI4)) S APCDOUT(0)="0^PIMS patch 1004 must be installed" Q
  1. D GETVISIT^BSDAPI4(.APCDIN,.APCDOUT)
  1. Q