Facility Members
Each Facility will have 1 or more FacilityMember
s that would represent the roles and permissions/privileges of each user member. It would also contain configurations specific to users (e.g., associated stockRooms for inventory staffs, withholding tax for doctors)
Roles
Roles are used primarily by client apps, privileges
are what the server uses for authorization. Usually, roles are used by client apps to represent a group of privileges (eg. doctor_*
roles should have med_records
privilege).
Some Roles used:
- admin
- admin_analyst
- proofreader
- releasing
- frontdesk_head
- frontdesk
- frontdesk_encoder
- nurse_head
- nurse
- therapist
- doctor
- doctor_pathologist
- doctor_radiologist
- doctor_sonologist
- doctor_pme
- lab_tech
- lab_qc
- lab_head
- imaging_tech
- imaging_qc
- imaging_head
- billing
- billing_encoder
- billing_head
- warehouse
- warehouse_manager
- warehouse_head
- pme_head
- pme_staff
Privileges
Privileges are what the server uses for authorizing client requests. aside from the special
privileges (superadmin
, admin
), most privileges follow the following pattern:
<basePrivilege>
- eg:
members
(privilege to manage facility members) - equivalent to having all sub privilege of the same base privilege
- eg:
<basePrivilege>Read
- eg:
membersRead
- read/fetch privilege
- eg:
<basePrivilege>Create
- eg:
membersCreate
- implies read/fetch privilege
- resource createion privilege
- eg:
<basePrivilege>Update
- eg:
membersUpdate
- implies read/fetch privilege
- resource patching (update properties) privilege
- eg:
<basePrivilege>Remove
- eg:
membersUpdate
- implies read/fetch privilege
- resource removal privilege
- eg:
Inviting A Facility Member
A facility membership invitation can be created using the account-invitations
API's create
method with a type of org-membership
. As soon as it is accepted (or a user registers using sent invitation), the facility memebrship will be created.
Creating, Updating, Removing A Facility Member
A facility membership can be created, updated, and removed using the organization-members
API's create
, update
, and remove
methods respectively using an account with the correct privileges (members
or membersCreate
, membersUpdate
, and membersRemove
);
Membership Visibility
facility memebers can be searched only if they are configured to be public (flagged using the field isPublic
)
Searching/Filtering/Sorting
Text searching/filtering via the member's personal-details can be done using the $search
read (GET) operator
The $search
operator can include the following fields:
organization
(required) theorganization
filter to use in searchingdoc_specialties
(optional) thedoc_specialties
filter to use in searchingtext
(optional) the string to use for searching the members's nameskip
(optional, defaults toquery.$skip
) the skip to use in search the member's personal detailslimit
(optional, defaults toquery.$limit
) the limit to use in search the member's personal detailssort
(optional) the sort configuration to use in search the member's personal details