VistA Analysis » VistA Reference » RPCs » ORWDOR VALNUM

ORWDOR VALNUM

Validates a numeric entry.

Properties

Property Value
Label VALNUM
MUMPS Implementation ORWDOR
Return Type SINGLE VALUE

MUMPS Method Description

Property Value
Method VALNUM^ORWDOR
Method Comment return error if invalid number
Input Parameters X, DOM
Code
 N LOW,HIGH,DEC
S LOW=$P(DOM,":"),HIGH=$P(DOM,":",2),DEC=$P(DOM,":",3),ERR=0
I $L($P(X,"."))>24 S ERR="1^Exceeded maximum number of 24 characters" Q
I X'?.1"-".N.1".".N S ERR="1^Entry must be numeric" Q
I X>HIGH!(X I $L($P(+X,".",2))>DEC D
. I DEC=0 S ERR="1^No decimal places allowed"
. E I DEC=1 S ERR="1^Only one decimal place allowed"
. E S ERR="1^No more than "_DEC_" decimal places allowed"

CPRS

File Type Description
Pascal File Orders/rODBase.pas


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