All checks were successful
Build and Push Docker Image / build (push) Successful in 4m14s
Reference numbers (unified scheme PREFIX-YYYYMM-HOSP-NNNN, e.g. CMP-202606-HHN-0001): - new ReferenceSequence model + generate_reference() helper (apps/core) - Complaint/Inquiry/Observation/Appreciation/Suggestion emit unified refs via save() - prefix-based auto-routing in public track API (CMP/INQ/OBS trackable; APR/SGT internal-only) - removed legacy CMP-/INQ- generators in ui_views, integrations, px_sources - migrations: core.0003_referencesequence, appreciation.0006, feedback.0008, observations.0012 - unit tests (format, sanitization, monthly reset, 40-thread concurrency) QA audit: - isolated E2E hospital sandbox mirroring HH-N + 10 role users (create_e2e_isolated_env) - feedback-modules-audit.spec.ts + audit helper (headed, run-to-completion) - reports/feedback-modules-qa-report.md Also bundles accumulated in-progress work across complaints, observations, organizations, templates, and other modules.
92 lines
5.3 KiB
Python
92 lines
5.3 KiB
Python
# Generated by Django 6.0.1 on 2026-06-09 13:54
|
|
|
|
import django.db.models.deletion
|
|
import uuid
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('complaints', '0015_complaintpdfsummary'),
|
|
('organizations', '0013_add_subsection_model'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='complaint',
|
|
name='complaint_source_type',
|
|
field=models.CharField(choices=[('internal', 'Internal'), ('external', 'External')], db_index=True, default='internal', help_text='Source type (Internal = staff-generated, External = patient/public-generated)', max_length=20),
|
|
),
|
|
migrations.CreateModel(
|
|
name='ChampionInvestigation',
|
|
fields=[
|
|
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('status', models.CharField(choices=[('questions_sent', 'Questions Sent'), ('answers_received', 'Answers Received'), ('reply_submitted', 'Reply Submitted')], default='questions_sent', max_length=20)),
|
|
('final_reply', models.TextField(blank=True)),
|
|
('champion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='champion_investigations', to='organizations.staff')),
|
|
('complaint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='investigations', to='complaints.complaint')),
|
|
('explanation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='investigation', to='complaints.complaintexplanation')),
|
|
('involved_department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='investigations', to='complaints.complaintinvolveddepartment')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Champion Investigation',
|
|
'verbose_name_plural': 'Champion Investigations',
|
|
'ordering': ['-created_at'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='InvestigationQuestion',
|
|
fields=[
|
|
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('question_text', models.TextField()),
|
|
('order', models.PositiveIntegerField(default=0)),
|
|
('investigation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='complaints.championinvestigation')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Investigation Question',
|
|
'verbose_name_plural': 'Investigation Questions',
|
|
'ordering': ['order', 'created_at'],
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='InvestigationResponse',
|
|
fields=[
|
|
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('token', models.CharField(db_index=True, max_length=64, unique=True)),
|
|
('is_completed', models.BooleanField(default=False)),
|
|
('completed_at', models.DateTimeField(blank=True, null=True)),
|
|
('email_sent_at', models.DateTimeField(blank=True, null=True)),
|
|
('sms_sent_at', models.DateTimeField(blank=True, null=True)),
|
|
('investigation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses', to='complaints.championinvestigation')),
|
|
('staff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='investigation_responses', to='organizations.staff')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Investigation Response',
|
|
'verbose_name_plural': 'Investigation Responses',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='InvestigationAnswer',
|
|
fields=[
|
|
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('answer_text', models.TextField(blank=True)),
|
|
('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='complaints.investigationquestion')),
|
|
('response', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='complaints.investigationresponse')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Investigation Answer',
|
|
'verbose_name_plural': 'Investigation Answers',
|
|
'unique_together': {('response', 'question')},
|
|
},
|
|
),
|
|
]
|