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

PSOUTCRM.m

Go to the documentation of this file.
  1. PSOUTCRM ;ORLFO/FJF/WC - PSO utilities for CRM; Mar 20, 2023@12:57:56
  1. ;;7.0;OUTPATIENT PHARMACY;**707**;DEC 1997;Build 18
  1. ;
  1. ; PSO utilities for SalesForce CRM application
  1. ;
  1. SWAP(INPT,THIS,THAT) ; swap this with that in a string
  1. N OUTP,I
  1. F I=1:1:$L(INPT,THIS) D
  1. .S $P(OUTP,THAT,I)=$P(INPT,THIS,I)
  1. Q OUTP
  1. ;
  1. RXVAL(RXN) ; validate Presciption number and return 0 node
  1. ; INPUT:
  1. ; RXN - external Presciption number
  1. ;
  1. ; OUTPUT:
  1. ; 1 = valid
  1. ; 0 or less = invalid prescription
  1. ;
  1. ;
  1. N DFN,LIST,X
  1. S X=0,RXN=$G(RXN) Q:RXN="" 0
  1. S DFN=-1
  1. S LIST="PSOV"
  1. D RX^PSO52API(DFN,LIST,,RXN)
  1. I $O(^TMP($J,"PSOV",$O(^TMP($J,"PSOV",-2))))>0 Q 1
  1. Q 0
  1. ;