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.
123 lines
5.7 KiB
Python
123 lines
5.7 KiB
Python
# Generated by Django 6.0.1 on 2026-05-11 20:32
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('feedback', '0002_initial'),
|
|
('organizations', '0004_legacylocation_legacymainsection_and_more'),
|
|
('px_sources', '0001_initial'),
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='feedback',
|
|
name='source',
|
|
field=models.ForeignKey(blank=True, help_text='Source of feedback', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='feedbacks', to='px_sources.pxsource'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedback',
|
|
name='staff',
|
|
field=models.ForeignKey(blank=True, help_text='Staff member being mentioned in feedback', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='feedbacks', to='organizations.staff'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedback',
|
|
name='subsection',
|
|
field=models.ForeignKey(blank=True, help_text='Specific subsection', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='feedbacks', to='organizations.legacysubsection'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedbackattachment',
|
|
name='feedback',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='feedback.feedback'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedbackattachment',
|
|
name='uploaded_by',
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='feedback_attachments', to=settings.AUTH_USER_MODEL),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedbackresponse',
|
|
name='created_by',
|
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='feedback_responses', to=settings.AUTH_USER_MODEL),
|
|
),
|
|
migrations.AddField(
|
|
model_name='feedbackresponse',
|
|
name='feedback',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='responses', to='feedback.feedback'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='patientcomment',
|
|
name='comment_import',
|
|
field=models.ForeignKey(blank=True, help_text='Import batch this comment came from', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='feedback.commentimport'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='patientcomment',
|
|
name='hospital',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='patient_comments', to='organizations.hospital'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='commentactionplan',
|
|
name='comment',
|
|
field=models.ForeignKey(blank=True, help_text='Source comment (may be null if aggregated from multiple)', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='action_plans', to='feedback.patientcomment'),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='commentimport',
|
|
unique_together={('hospital', 'year', 'month')},
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['status', '-created_at'], name='feedback_fe_status_212662_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['hospital', 'status', '-created_at'], name='feedback_fe_hospita_4c1146_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['department', 'status', '-created_at'], name='feedback_fe_departm_be6aa4_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['assigned_to', 'status', '-created_at'], name='feedback_fe_assigne_c79fd3_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['feedback_type', '-created_at'], name='feedback_fe_feedbac_6b63a4_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedback',
|
|
index=models.Index(fields=['is_deleted', '-created_at'], name='feedback_fe_is_dele_f543d5_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='feedbackresponse',
|
|
index=models.Index(fields=['feedback', '-created_at'], name='feedback_fe_feedbac_bc9e33_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='patientcomment',
|
|
index=models.Index(fields=['hospital', 'classification', 'sub_category'], name='feedback_pa_hospita_008b6d_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='patientcomment',
|
|
index=models.Index(fields=['hospital', 'year', 'month'], name='feedback_pa_hospita_2b8ae8_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='patientcomment',
|
|
index=models.Index(fields=['hospital', 'source_category'], name='feedback_pa_hospita_af40c7_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='commentactionplan',
|
|
index=models.Index(fields=['hospital', 'status'], name='feedback_co_hospita_8139f7_idx'),
|
|
),
|
|
migrations.AddIndex(
|
|
model_name='commentactionplan',
|
|
index=models.Index(fields=['hospital', 'year', 'month'], name='feedback_co_hospita_8565e5_idx'),
|
|
),
|
|
]
|