• Chris Combs's avatar
    Library of custom Functions _ydboctoFunctions.m · f9142d64
    Chris Combs authored
    CURR_TIMESTAMP() --horolog datetime  or CURR_TIMESTAMP("v") Fileman Datetime
    DATEFORMAT(value,formatcode) -- formats based on datetime type returns MM/DD/YYYY HH:MM:SS as default
    			     -- uses "5ZSP" for fileman dates unless formatcode is otherwise specified
    			     -- if fileman date calls VA routine $$FMTE^XLFDT(value,format) to format
    IFNULL(value,replacer)	    -- Takes a passed field and replaces a null value with whatever is passes as the second
    TOKEN			    -- Renamer for Mumps $Piece function
    Replace(value,finder,replacement) -- takes any string and searches for the finder string to replace it with the
    				replacement string, modified string is returned
    SUBSTRING(value,start,range)   -- returns a part of passed value staring at the position specified by
    				start (2nd parameter), continuing for range (3rd parameter) or
    				end of string whichever comes first
    FMGET(file#,field# or name,keys) -- VistA specific, uses VA Routine $$GET1^DIQ to take foreign kets and fetch a field 					from the specified
    LEFTY(value,characters)		-- return left x characters from value
    RIGHTY(value,caharacters)	-- return right x charaters from value
    PATINDEX(value,searchstring)	-- returns the position of the first occruence of search string in value
    NUMBER(value)			-- returns the mumps equivalent of +value, numeric portion returned only
README.md 3.16 KB