# ORALWORD ALLWORD

## Properties

Property Value
Label ALLWORD
MUMPS Implementation ORALWORD
Return Type ARRAY

## Input Parameters

Name Type Maximum Data Length Required Description
DFN LITERAL   true
OROI LITERAL   true
ORX LITERAL   true
ORTYPE LITERAL   true

## MUMPS Method Description

Property Value
Method ALLWORD^ORALWORD
Input Parameters DFN, ORX, ORTYPE, PROV
Code
`` N OROI,ORYS,QOIEN,QPIEN,ORCLOZ,QOAA S OROI=0 I ORTYPE="E" S OROI=\$G(^OR(100,ORX,.1,1,0)) I ORTYPE="Q" D .S QPIEN=\$O(^ORD(101.41,"AB","OR GTX ORDERABLE ITEM","")) Q:QPIEN'>0 .S QOIEN=\$O(^ORD(101.41,ORX,6,"D",QPIEN,"")) Q:QOIEN'>0 .S OROI=\$G(^ORD(101.41,ORX,6,QOIEN,1)) .S QOAA=\$P(\$G(^ORD(101.41,ORX,5)),U,8) I ORTYPE="N" S OROI=ORX Q:OROI'>0 S ORY=0 S ORCLOZ=\$\$ISCLOZ(OROI),ORY=ORY_U_ORCLOZ,ORY(0)=U_ORCLOZ Q:'ORCLOZ N ORQUIT S ORQUIT=0 I '\$G(PROV) S PROV=DUZ I \$G(PROV) D .I '\$L(\$\$DEA^XUSER(,PROV)) D ..S ORQUIT=1,ORY=1 ..S ORQUIT=1,ORY=1 ..S ORY(1)="*** You are not authorized to place Clozapine orders." ..S ORY(2)="You must have a DEA#.  Please contact your" ..S ORY(3)="CAC or IRM for more information. ***" .Q:ORQUIT .I '\$D(^XUSEC("YSCL AUTHORIZED",PROV)) D ..S ORQUIT=1,ORY=1 ..S ORY(1)="*** You are not authorized to place Clozapine orders." ..S ORY(2)="You must hold key YSCL AUTHORIZED.  Please contact your" ..S ORY(3)="CAC or IRM for more information on this key. ***" Q:ORQUIT S ORYS=\$\$CL^YSCLTST2(DFN) I +ORYS>0 D BEFQUIT  Q S ORY=1_U_ORCLOZ,ORY(0)="Problem Ordering Clozapine Related Medication"_U_ORCLOZ I +ORYS<0 D  Q .S ORY(1)="*** This patient is not registered in the clozapine treatment " .S ORY(2)="program or has been discontinued from the program and must " .S ORY(3)="have a new registration number assigned.  Contact the NCCC to " .S ORY(4)="get this patient registered in the program. ***" I +ORYS=0 D  Q .I \$\$OVERRIDE^YSCLTST2(DFN) S ORY=0_U_ORCLOZ,ORY(0)=U_ORCLOZ D BEFQUIT  Q  ;override allowed .N COUNT S COUNT=0 .S COUNT=COUNT+1,ORY(COUNT)="*** This clozapine drug may not be dispensed to the patient at this " .S COUNT=COUNT+1,ORY(COUNT)="time based on the available lab tests related to the clozapine " .S COUNT=COUNT+1,ORY(COUNT)="treatment program. Please contact the NCCC to request an override in" .S COUNT=COUNT+1,ORY(COUNT)="order to proceed with dispensing this drug. ***" .Q:'\$L(\$P(ORYS,U,3))!('\$L(\$P(ORYS,U,5))) .S COUNT=COUNT+1,ORY(COUNT)="Related Lab Test(s)" .S COUNT=COUNT+1,ORY(COUNT)="===================" .;the lab values returned by Mental Health are given in 4 digit numbers to be standard with  .;reporting formats to the NCCC, we are dividing by 1000 to align it with the display of the .;labs on the lab tab .;S:\$L(\$P(ORYS,U,3)) COUNT=COUNT+1,ORY(COUNT)=\$P(ORYS,U,3)_":  "_(\$P(ORYS,U,2)/1000)_" K/cmm" .;S:\$L(\$P(ORYS,U,5)) COUNT=COUNT+1,ORY(COUNT)=\$P(ORYS,U,5)_":  "_(\$P(ORYS,U,4)/1000)_" K/cmm" .S:\$L(\$P(ORYS,U,3)) COUNT=COUNT+1,ORY(COUNT)="WBC:  "_(\$P(ORYS,U,2)/1000)_" K/cmm" .S:\$L(\$P(ORYS,U,5)) COUNT=COUNT+1,ORY(COUNT)="ANC:  "_(\$P(ORYS,U,4)/1000)_" K/cmm" .S COUNT=COUNT+1,ORY(COUNT)="Date/Time of last tests: "_\$\$DATE^ORU(\$P(ORYS,U,6))``

## CPRS

File Type Description
Pascal File Orders/rODMeds.pas

Document generated on August 31st 2022, 2:55:43 pm
{"ft_lang_label":"__label__en","ft_lang_prob":0.55370194,"math_prob":0.9839287,"size":2691,"snap":"2023-40-2023-50","text_gpt3_token_len":1086,"char_repetition_ratio":0.17119464,"word_repetition_ratio":0.10223642,"special_character_ratio":0.37346712,"punctuation_ratio":0.2184874,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95278364,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-06T05:19:52Z\",\"WARC-Record-ID\":\"<urn:uuid:dbfc4fd3-26b7-4812-93d3-faa03ddd9b1b>\",\"Content-Length\":\"6593\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c0238fb2-7e23-4b05-86fc-e92723719f07>\",\"WARC-Concurrent-To\":\"<urn:uuid:ca1671cd-e647-405e-9ee7-8719663fe72b>\",\"WARC-IP-Address\":\"66.228.42.161\",\"WARC-Target-URI\":\"https://caregraf.com/VAVistAAnalysis/VistAReference/RPCs/ORALWORD_ALLWORD\",\"WARC-Payload-Digest\":\"sha1:PTZJTPGTEJY45ST7AJAWK6PPXCGRIDQW\",\"WARC-Block-Digest\":\"sha1:KUUV4BFAVOJUS3T4774WBVABBDXGWJWG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100583.13_warc_CC-MAIN-20231206031946-20231206061946-00880.warc.gz\"}"}