ClinGen / stanford-affils

Stanford ClinGen's affiliations service
MIT License
0 stars 0 forks source link

feat: add both ID systems and validators #103

Closed sanchegm closed 3 months ago

sanchegm commented 3 months ago

Description

Issue Ticket Number and Link
 Related to issue #73. Should Close #73.

Checklist
Remove any options that are not applicable
 [X] I have reviewed the how-to guide and the contributing file.
 [X] I have run required code checks and resolved any blockers.
 [X] I have created the necessary tests to show my changes are effective and work as intended.
 [X] I have thoroughly commented my code, especially in more complex areas.
 [X] I have updated any necessary documentation.

Screenshots / Recordings Attempt to add new affiliation with Independent Curation Panel type and a curation_panel_id value. This should produce the error shown.

Screenshot 2024-07-29 at 4 51 15 PM Screenshot 2024-07-29 at 4 51 28 PM

This validator also works on existing affiliations if they have a curation_panel_id value, the affiliation type cannot be switched to Independent Curation Panel. The same error is produced when the Save button is selected. Also note that ID's cannot be edited after an affiliation is created.

Screenshot 2024-07-29 at 4 53 34 PM Screenshot 2024-07-29 at 4 53 46 PM Screenshot 2024-07-29 at 4 53 55 PM

After selecting GCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown. Screenshot 2024-07-30 at 2 03 30 PM

After selecting VCEP type, providing an invalid curation_panel_id, and selecting "save" the below error is shown. Screenshot 2024-07-30 at 2 04 14 PM

After providing an invalid affiliation_id and selecting "save" the below error is shown. Screenshot 2024-07-30 at 2 04 35 PM