new DocumentMetaService()
Service for Meta (non-clinical) queries relating to the Document domain.
Methods
-
isUserAProvider(visitDate, context, callback)
This Boolean RPC returns TRUE if the user was a known provider on the date specified.
-
Parameters:
Name Type Description visitDate
String Optional FileMan formatted date (time). If non is provided, the current date is assumed.
context
Object Session context information associated with the service call.
callback
function Function called on process completion, with standard (err, result) signature.
Returns:
returns true if the user was a known provider on the date specified
- Type
- Boolean
-
lookupDocumentPrintName(documentId, context, callback)
Returns a string containing the Print Name of the corresponding Document Definition.
-
A section of $$PNAME^TIULC1 is not emulated in this service Function lookupDocumentPrintName, as it has no effect on the final output. For details, see below:
I) A condition tracker/flag variable (named TIUMOM in the native code) is hard-code initialized as 0, and it is never reassigned. This lack of reassignment precludes an entire section of MUMPS code from being executed. II) Additionally, there is a conditional evaluating values despite them being non-existent and defunct. (File 8925.1 location 9, documented in osehra.org). However, even if accessing this non-existent data were successful, the outcome of it assigns the flag to 0, which is identical to its initial assignment, changing nothing whether it succeeds or fails. Conclusion: Since the flag is always set to pass certain conditionals and always set to fail others, only the code that has a possibility of actually being executed has been implemented in this emulation
Parameters:
Name Type Description documentId
String Document to search for
context
Object Session context information associated with the service call.
callback
function Function called on process completion, with standard (err, result) signature.
Returns:
getPrintName printName based on document if exists or label
- Type
- String
-
lookupTiuTemplateAccessLevel(template, location, context, callback)
Returns Template Access level of User (0 = FULL ACCESS, 1 = READ ONLY, 2 = NO ACCESS,3 = SHARED TEMPLATES EDITOR - ACCESS PARAMETERS DO NOT APPLY
-
Parameters:
Name Type Description template
String The template ID, converted to URN, to check for user's access level.
location
String A specified location ID, converted to URN (optional).
context
Object Session context information associated with the service call.
callback
function Function called on process completion, with standard (err, result) signature.
Returns:
Object with value and label.
- Type
- Object
Example
{ value: 0, label: 'FULL ACCESS' }