mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Recordkeeping procedures, QC audits and user instructions (AC 120-78B)
- Admin → Recordkeeping Procedures: generated procedures document (2.2.11 / 3.2.8) from the system setup plus owner-entered details; adopted as numbered, immutable revisions; included in the records package - Admin → Records Audits: periodic QC checklist (3.2.8.5) combining app checks with a restore test, sampled entries vs. source documents and a user review; next due date on About and in admins' weekly reminder - User instructions at /help/records, linked from the logbook and signing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68a1719db2
commit
761f381679
27 files changed
+668
-10
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# A quality-control audit of the electronic records (AC 120-78B 3.2.8.5):
|
||||
# a checklist, some items checked by the app, some confirmed by the auditor.
|
||||
class AuditRun < ApplicationRecord
|
||||
belongs_to :performed_by, class_name: "User", optional: true
|
||||
|
||||
scope :latest_first, -> { order(performed_at: :desc) }
|
||||
before_update { throw :abort }
|
||||
before_destroy { throw :abort }
|
||||
|
||||
def self.latest = latest_first.first
|
||||
|
||||
def self.next_due
|
||||
interval = RecordkeepingPolicy.current.audit_interval_months.months
|
||||
(latest&.performed_at || Time.current - interval).to_date + interval
|
||||
end
|
||||
|
||||
def self.due_soon? = next_due <= 14.days.from_now.to_date
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# An adopted revision of the procedures document, kept for good (the
|
||||
# superseded ones are the archive, as AC 120-78B 4.3.8 asks of manuals).
|
||||
class ProceduresRevision < ApplicationRecord
|
||||
belongs_to :adopted_by, class_name: "User", optional: true
|
||||
|
||||
scope :latest_first, -> { order(number: :desc) }
|
||||
before_update { throw :abort }
|
||||
before_destroy { throw :abort }
|
||||
|
||||
def self.current = latest_first.first
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
# The facts the procedures document needs that the app can't know (who is
|
||||
# responsible, where it's hosted, the off-site backup, how often to audit).
|
||||
# One row for the installation.
|
||||
class RecordkeepingPolicy < ApplicationRecord
|
||||
validates :audit_interval_months, numericality: { only_integer: true, in: 1..24 }
|
||||
validates :audit_sample_size, numericality: { only_integer: true, in: 1..50 }
|
||||
|
||||
def self.current = first || create!
|
||||
|
||||
def complete? = [ operator_name, responsible_name, hosting_description, offsite_backup_description ].all?(&:present?)
|
||||
end
|
||||
Reference in new issue
Block a user