CB Medical Archives
A department-based medical records system for RSG Core, with patient registration, visit records, deceased status, death certificates, shared documents, and optional Discord certificate delivery.
Current resource version: 2.2.4
Framework: RSG Core
Dependencies: rsg-core, rsg-inventory, cb-libs, ox_lib, oxmysql
Installation
- Copy the inner
cb-marchivesdirectory into your resources folder. - Import
install/cb-marchives.sql. - Configure departments, jobs, access methods, and death certificates in
shared/config.lua. - If item access is enabled, add
archive_bookfrom the install item file toRSGShared.Items. - Start resources in this order:
ensure rsg-core
ensure rsg-inventory
ensure cb-libs
ensure ox_lib
ensure oxmysql
ensure cb-marchivesFeatures
- Department-scoped patient archive
- Patient lookup, registration, and nearest-player registration
- Paginated medical history
- Create and update medical records
- Deceased declarations and certificate amendments
- Configurable manners of death
- Shareable patient documents
- Multiple medical jobs and minimum grades per department
- Target, prompt, item, or command access
- Optional office blips
Access configuration
Config.Access = {
target = true,
prompt = false,
item = false,
command = false,
itemName = 'archive_book',
commandName = 'marchives'
}Enable only the access methods you intend to support. The default command, when enabled, is /marchives.
Departments
Each department supports a label, patient ID prefix, prompt identifier, blip settings, job/grade map, and multiple locations.
valentine = {
label = "Valentine Physician's Office",
prefix = 'VAL',
jobs = { valmedic = 0, doctor = 0, medic = 0 },
locations = { vector3(-289.46, 806.82, 119.31) }
}Use unique department keys and prefixes. Replace the example job names with the exact job keys used by your RSG server.
Duty and patient IDs
Config.RequireOnDutyrestricts archive use to on-duty medical staff.Config.PatientIdPrefixis the global fallback prefix.- A department's
prefixidentifies records created through that office.
Death certificates
Config.DeathCertificates controls the feature, certificate title, seal image, webhook presentation, and valid manners of death. Leave the webhook blank when Discord delivery is not required.
Webhook URLs are credentials. Store and distribute them privately, rotate any webhook that has appeared in source control, and never place one in public documentation.
Typical workflow
- Open a permitted medical archive.
- Search for an existing patient or register the nearest player.
- Open the patient record and add a medical entry.
- Update the entry when follow-up treatment is performed.
- When necessary, declare the patient deceased and complete the certificate.
- Upload or share the resulting document through the configured workflow.
Troubleshooting
The archive will not open
Check job name, minimum grade, duty state, department location, and enabled access method. Ensure cb-libs and ox_lib started first.
Nearest-player registration fails
The target must be online and close enough to the medical worker. Make sure the selected character has fully loaded into RSG Core.
Death certificates do not reach Discord
Confirm the feature is enabled, the webhook has not been revoked, and the VPS can make outbound HTTPS requests. Check the server console for Discord HTTP errors.
Patient records disappear
Verify the SQL import and database connection. Do not change department prefixes after issuing records unless you also migrate existing data.

