Commit ede2c47
authored
Bug fixes for birthdate changes and acquisition date selection (#361)
* Added EventsWidget HTML page
* 1. Corrected adult age by gender in PotentialDams.sql
2. Closed AcqCodes that haven't been used in the past five years (in tsv file)
3. Added missing acquisition codes to tsv file
4. Filtered acq code 97 from fetchAcquisitionTypes API
5. Removed the join on the v_demographics view from arrivals and departures ETL source queries - if animal is removed from the colony
before the ETL runs, then the deletion will be missed
6. Started refactoring retrieval of dams and sires to use a birthdate parameter
* 1. Refactored PotentialDams.sql and PotentialSires.sql to use selectedOptionParm
parameter to account for differences in how potential sires and dams are handled
depending on whether a birth or other acquisition is being recorded
2. fetchLocations.js API updated to filter based on acquisiton codes for offsite acquisitions
3. fetchPotentialDams.js and fetchPotentialSires.js APIs updated to handle SQL parameters
4. Changes to AccountPanel.jsx to allow non-birth acquisitions to have null accounts
5. Changes to AcquisitionPanel.js to reload location codes when acquisition type changes
6. Changes made to DemographicsPanel.js to reload dams and sires after birth date is entered
7. Added new constant offSiteAcqCodes to track acquisition of animals not being added to the colony
8. Updated request API to handle parameters
9. UpdateAnimalData.js to allow null animal accounts
10. Updated ANPRC_EHRValidator.java to permit null accounts in certain conditions
11. Updated Jest tests
* Updated Jest test and snapshots
* 1. added source location to New Animal Wizard UI - AcquisitionPanel.jsx
2. changed how ehr_lookups.source is being populated - went from TSV
file to ETL
3. added source query for source locations -
labkey_etl.v_sourceLocations
4. added location description to lookup list
5. added sourceLocation to the updateAnimalData.js API
6. added sourceLocation to SummaryPanel.jsx - also tweaked hover text
locations
7. added sourceLocation to default state - NewAnimalState.js
8. added sourceLocation jest tests, test data, mock API
9. updated snapshots
10. many lint fixes including files outside the scope of this feature
branch
* removed ehr_lookups.source from populateData page
* 1. updates related to sourceLocation for updating newAnimalData table
2. added query meta data for sourceLocation
* missed file in last commit
* 1. don't allow future acquisition dates 2. fixed parameter passing bug in HandleBirthDateChange 3. code clean up 4. updated jest tests 5. updated snapshots1 parent 15d612e commit ede2c47
7 files changed
Lines changed: 156 additions & 71 deletions
File tree
- snprc_ehr
- resources/queries/study
- src/client/NewAnimalPage
- components
- services
- tests
- __snapshots__
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | 110 | | |
113 | 111 | | |
114 | 112 | | |
| |||
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
122 | | - | |
123 | | - | |
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
| |||
439 | 435 | | |
440 | 436 | | |
441 | 437 | | |
442 | | - | |
443 | 438 | | |
444 | 439 | | |
445 | 440 | | |
| |||
508 | 503 | | |
509 | 504 | | |
510 | 505 | | |
| 506 | + | |
511 | 507 | | |
512 | 508 | | |
513 | 509 | | |
| |||
535 | 531 | | |
536 | 532 | | |
537 | 533 | | |
| 534 | + | |
538 | 535 | | |
539 | 536 | | |
540 | 537 | | |
| |||
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
102 | 110 | | |
103 | 111 | | |
104 | 112 | | |
| 113 | + | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | | - | |
45 | | - | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
0 commit comments