Most of the FreeMED API is under the FreeMED:: namespace, which helps segment core FreeMED API calls so that they are both obviously belonging to FreeMED and not possibly interfering with function calls from other toolkits.
Several functions are available to control the level of access that is granted to certain portions of the program and different patients' EMRs. This is partially to comply with HIPAA regulations in the United States, as well as providing the ability for FreeMED to function as a server for multiple discrete locations in the same installation.
This function checks in the user table for access to a patient, based on the facility where their medical record is kept. This is particularly useful when trying to determine if a home office has access to a medical record.
This function checks in the user table for access to a patient, based on the providers / physicians who have access to their electronic medical record. Optionally the user ID can be provided, if the programmer does not want to read the user ID from the session cookie.
user_flag determines if
flag is set for the current user.
Examples of valid flags are USER_ADMIN, USER_DATABASE,
USER_DELETE.