icgc-argo / argo-clinical

Clinical data submission for ARGO programs.
GNU Affero General Public License v3.0
2 stars 0 forks source link

Add prefix to the pretty ids for primary_diagnosis, treatment, followup #761

Open kcullion opened 2 years ago

kcullion commented 2 years ago

Why we need it?

As discussed on slack with Jon, Bashar, Hardeep, and Linda

We could have the same submitter_treatment_id being used in two different programs, so if we assign an ARGO ID, it will make it unique. Also a data submitter could submit a really long for example submitter_treatment_id, making it difficult to show in the Donor entity page later on - see Kim's mockup in this ticket: https://github.com/icgc-argo/platform-ui/issues/2129 where she shows TREATMENT TR8982 (which would presumably be the ARGO generated pretty ID, rather than a really long submitter_treatment_id)

Let's append a prefix to the following generated ARGO ids

Re. Biomarkers.From Hardeep: we can leave it for now. I don't think we need it because the Biomarker entry is tied to one of the other submitter IDs (if it isn't, then it's associated with a time interval).

Expected Outcome

when making a query such as {{clinicalUrl}}/clinical/program/ALEXIS-INTL/donors, I should expect to see primaryDiagnosisId = PD999 right now the endpoint returns 999, which is generated by mongo

Possible Implementation

Add functions similar to sanitizeDonorOutput to add prefix.

Buwujiu commented 1 year ago

@samrichca moving this to the next sprint, please prioritize on donor dashboard fixes. Thank you!