VistA Analysis » VistA Reference » RPCs » ORWDFH PARAM

ORWDFH PARAM

Returns dietetics parameters for a patient at a location.

Properties

Property Value
Label PARAM
MUMPS Implementation ORWDFH
Return Type ARRAY

MUMPS Method Description

Property Value
Method PARAM^ORWDFH
Method Comment Return dietetics parameters for a patient at a location
Input Parameters ORVP, ORLOC
First Comment
 ORLOC: hospital location ptr to ^SC #44
ORLST(1)=EB1^EB2^EB3^LB1^LB2^LB3^EN1^EN2^...LE2^LE3
ORLST(2)=BAB^BAE^NAB^NAE^EAB^EAE^BegB^BegN^BegE^Bagged
ORLST(3)=type of service^RegIEN^NPOIEN^EarlyIEN^LateIEN^TFIFN
ORLST(4)=max days in future for outpatient recurring meals
ORLST(5)=default outpatient diet
Code
 Q:'+ORVP
N X,IEN,CURTM
S ORVP=+ORVP_";DPT(",ORLOC=+ORLOC
S CURTM=$$NOW^XLFDT
I +$G(^SC(ORLOC,42)) S ORLOC=$G(^SC(ORLOC,42))_";DIC(42"
E S ORLOC=ORLOC_";SC("
D EN1^FHWOR8(ORLOC,.ORLST)
S:'$D(ORLST(1)) ORLST(1)="" S:'$D(ORLST(2)) ORLST(2)="" ;p375 corrected array return for missing/invalid location
I '$L($G(ORLST(3))) S ORLST(3)="TCD" ;p375 changed default from "T" to "TCD"
S $P(ORLST(3),U,2)=$O(^ORD(101.43,"S.DIET","REGULAR",0))
S $P(ORLST(3),U,3)=$O(^ORD(101.43,"S.DIET","NPO",0))
S $P(ORLST(3),U,4)=$O(^ORD(101.43,"S.E/L T","EARLY TRAY",0))
S $P(ORLST(3),U,5)=$O(^ORD(101.43,"S.E/L T","LATE TRAY",0))
N TF S TF=$$CURRENT^ORCDFH("TF") I $L(TF,";")=1 S TF=TF_";1"
I TF,'$$FUTURE^ORCDFH("EFFECTIVE DATE/TIME") S $P(ORLST(3),U,6)=TF
I $$VERSION^XPDUTL("FH")>5 D
. S ORLST(4)=$$MAXDAYS^FHOMAPI(ORLOC)
. D DIETLST^FHOMAPI Q:'$G(FHDIET(1))
. S IEN=$O(^ORD(101.43,"ID",$P(FHDIET(1),U,1)_";99FHD",0)) Q:+IEN=0
. S X=^ORD(101.43,"S.DIET",$P(FHDIET(1),U,2),IEN)
. I +$P(X,U,3),$P(X,U,3) . I $P($G(^ORD(101.43,IEN,"FH")),U)'="D",($P($G(^(0)),U)'="NPO") Q
. S ORLST(5)=+$G(IEN)

CPRS

File Type Description
Pascal File Orders/rODDiet.pas


Document generated on August 31st 2022, 2:55:43 pm