|Contents:||Main||Chapter||See Also:||Getting Started Manual||Advanced User Manual|
A programmer can enter an executable line of M[UMPS] code at any point in FileMan dialog where one would normally be allowed to use a Computed Expression.
The Computed-Expression M[UMPS] code must create a variable X, which will be understood to be the value of its computation. The variables D0, D1, etc. can be assumed to exist, defining which file or subfile entry is being used.
A Computed Date will have "CD" in the Field Specifier. The X value created by the code should look like the numerical internal form of a Date -- or a null string if the computation results in no legal date.
A Computed Pointer will have "Cp" in the Field Specifier, followed immediately by the file number of the pointed-to. The X value created by the code should look like the numerical internal entry number of an entry in that file -- or a null string if the computation results in no legal pointer value.
A Computed Multiple will have "Cm" in the Field Specifier. The code should create a value X several times, once for each multiple. Then, in the same loop, it should XECUTE DICMX. DICMX will exist at the time the code is used. The code should also create a variable D each time. Executing DICMX may result in D being killed, in which case the code should quit its loop.
NOTE: A M[UMPS] Computed Expression should be written so that more code can be concatenated to the end of it. IF statements, QUIT commands, and FOR loops should not appear. For an expression of any complexity, the best form to use is
or DO ^ROUTINE
Create a Computed Pointer from the PATIENT file (#2) to the NEW PERSON file
(#200) which points to
the last user who edited the patient:
Create a Computed Date which gives the patient's next birthday:
Reviewed/Updated: March 8, 2007