diff --git a/CHANGES b/CHANGES index ccdd626..539f6f3 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,8 @@ Changes unreleased ------ +- fix Server error on saving StudyMedication and Adherence CRF proxy + models (#711) - add Gunicorn and Nginx web config - add project (static HTML) landing pages diff --git a/effect_subject/reference_model_configs.py b/effect_subject/reference_model_configs.py index bc7f667..a62dfa3 100644 --- a/effect_subject/reference_model_configs.py +++ b/effect_subject/reference_model_configs.py @@ -1,9 +1,25 @@ -from edc_reference import site_reference_configs +from edc_reference import ReferenceModelConfig, site_reference_configs site_reference_configs.register_from_visit_schedule( visit_models={"edc_appointment.appointment": "effect_subject.subjectvisit"} ) +# Register main Adherence model (only accessed via proxy models) +site_reference_configs.register( + reference_config=ReferenceModelConfig( + "effect_subject.adherence", + fields=["report_datetime"], + ) +) + +# Register main Study Medication model (only accessed via proxy models) +site_reference_configs.register( + reference_config=ReferenceModelConfig( + "effect_subject.studymedication", + fields=["report_datetime"], + ) +) + site_reference_configs.add_fields_to_config( name="effect_subject.signsandsymptoms", fields=["xray_performed", "lp_performed", "urinary_lam_performed"],