Closed YuanTian1991 closed 3 years ago
Update, Thank God I have not merge my current branch, so the naughty Patient PH00008630 could still be deleted by old dev-live system (new branch version can't achieve it actually...maybe I should adopt the old design). However, I leave this sample here for now, to let the backend team check possible bugs.
The two patients are created by: https://github.com/phenopolis/phenopolis_browser/blob/3939ea660e70d4ab92e45b371378a16eb3fccafc/views/individual.py#L126-L177
The main error for above API is:
- Patient created by a normal user (like Tian) is not accessible. (By the way, Demo user can not create patient at all).
- Create Patient does not have proper HPO/All tag in feature, which is vital to be searched out.
Patient information (like features, genes, sex .etc) can be updated by below API: https://github.com/phenopolis/phenopolis_browser/blob/3939ea660e70d4ab92e45b371378a16eb3fccafc/views/individual.py#L95-L123
The potential error for above API is:
When I assign patient with for example 'All', the feature will show
HP:0000001
, but notAll
tag will be added. Correct me if I need to pass correct data from front-end.
I think we should:
The problem is that, essentially, we are creating the new patient into phenopolis.individual
and related tables: phenopolis.individual_feature
, phenopolis.individual_gene
while autocomplete
module still looks into old schema public.individuals
.
As I mentioned in the meeting, I need to refactor autocomplete.py
and other files, but doing so I need to refactor users
(and this gets quite complicated and I'd need to sort several other tables associated to it), but let me see if I can fix only for patient for the moment.
I need to refactor hpo.py
, to stop using old schema.
AFAIK I've fixed all the issues reported here. Just disable cache when using Chrome Inspect to see your changes about patients and so on.
Be careful as well when using autocomplete, it's still looking at old tables so, when creating a new patient, "Blindness" may show up but won't work, try e.g. "Skin tags", that will work. My next step to finish refactoring autocomplete.py
.
Test it yourself and, if happy, close this ticket.
Fixed with #324
I created two patients via dev-API, one is under my account 'Tian' (PH00008630), and one under Admin account (PH00008631).
They can both be seen in Manage_Patient page, which is Admin only. And the total number of patient shows 8631, which is OK.
However, when click the patient ID created by "Tian" account: PH00008630, there is no information could be fetched for this patient. However, PH00008631 works well.
Even, if we now change to My_Patient page. All these new created patients can't be seen. It seems above two API call referred two different DB.
Finally, I tried to search the new created patients in dev-live website, only the patient created by Admin (PH00008631) can be found and properly clicked. But it can't be previewed properly.