Closed fredkingham closed 6 years ago
As discussed elsewhere, can we at least attempt to convert Mine to be a TaggedPatientList rather than hardcoding it into the Opal field schema ?
@pacharanero might be worth a chat when you first pick this one up :)
seems ok to me. good job
In elcid adding a patient by the teams modal works.
Adding a patient via the
Add Patient
button does not work.This is because the tagging schema is broken.
Subrecord.build_field_schema
to return the list of fields that can be set on a model.Tagging.build_field_schema
mocks this up a bit and pretends that eachtag
is a different field. e.g. infectious_diseases would be a boolean field on the model as far as the client knows. Episode then sorts it all out.Tagging.build_field_schema
iterates over the list of tagged patient lists but excludesmine
so the front end does not thingmine
is a field for tagging, so nothing gets added,Side effects of this is that if you then try and add a model that you have added to
mine
to another team it will also be removed.Solution, copy
TaggedPatientListMetadata.to_dict
and hard code inmine
for the time being. https://github.com/openhealthcare/opal/blob/v0.10.0/opal/core/patient_lists.py#L333