Skip to content

Commit 70642c5

Browse files
committed
docs: add documentation about the EMu views
Just preps for the moment but with the intention to expand later
1 parent db55c56 commit 70642c5

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

dataimporter/emu/views/README.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# EMu views
2+
3+
This directory contains the views derived from EMu data.
4+
Each module contains one view subclass along with any additional functions required to
5+
make the view work.
6+
Additionally, there is a `utils` module containing common functions and variables.
7+
8+
## Common checks
9+
10+
### Departments
11+
12+
In ecatalogue derived views it is common for the first value in the `ColDepartment`
13+
field to be checked against this list of values:
14+
15+
- Botany
16+
- Entomology
17+
- Mineralogy
18+
- Palaeontology
19+
- Zoology
20+
21+
If the value is in this list then the record is valid and can proceed with any other
22+
filter checks.
23+
24+
### Disallowed states
25+
26+
In ecatalogue derived views it is common for the first value in the `SecRecordStatus`
27+
field to be checked against this list of values:
28+
29+
- DELETE
30+
- DELETE-MERGED
31+
- DUPLICATION
32+
- Disposed of
33+
- FROZEN ARK
34+
- INVALID
35+
- POSSIBLE TYPE
36+
- PROBLEM
37+
- Re-registered in error
38+
- Reserved
39+
- Retired
40+
- Retired (see Notes)
41+
- SCAN_cat
42+
- See Notes
43+
- Specimen missing - see notes
44+
- Stub
45+
- Stub Record
46+
- Stub record
47+
48+
If the value matches any of these values it will be rejected.
49+
50+
## View Definitions
51+
52+
### preparation
53+
54+
Represents a preparation record and is published to the sample dataset on the Data
55+
Portal.
56+
57+
#### Filter flowchart
58+
```mermaid
59+
flowchart TD
60+
START(ecatalogue record)
61+
PREP{ColRecordType is preparation}
62+
MCF{ColSubDepartment is molecular collections}
63+
MGP{ColRecordType is mammal group part}
64+
MAMMALS{ColSubDepartment is ls mammals}
65+
DTOL{NhmSecProjectName first value is Darwin Tree of Life}
66+
WP{AdmPublishWebNoPasswordFlag first value is y}
67+
GUID{AdmGUIDPreferredValue first value is valid GUID}
68+
DIS{SecRecordStatus first value is in list of disallowed states}
69+
DEPT{ColDepartment first value is in list of allowed departments}
70+
LOAN1{LocPermanentLocationRef first value is 3250522}
71+
LOAN2{LocCurrentSummaryData contains the word loan}
72+
NO[Reject]
73+
YES[Success, is preparation record]
74+
75+
START --> PREP
76+
PREP -->|Yes| MCF
77+
PREP -->|No| MGP
78+
MCF -->|Yes| WP
79+
MCF -->|No| NO
80+
MGP -->|Yes| MAMMALS
81+
MGP -->|No| NO
82+
MAMMALS -->|Yes| DTOL
83+
MAMMALS -->|No| NO
84+
DTOL -->|Yes| WP
85+
DTOL -->|No| NO
86+
WP -->|Yes| GUID
87+
WP -->|No| NO
88+
GUID -->|Yes| DIS
89+
GUID -->|No| NO
90+
DIS -->|No| DEPT
91+
DIS -->|Yes| NO
92+
DEPT -->|Yes| LOAN1
93+
DEPT -->|No| NO
94+
LOAN1 -->|Yes| LOAN2
95+
LOAN1 -->|No| NO
96+
LOAN2 -->|Yes| YES
97+
LOAN2 -->|No| NO
98+
```

0 commit comments

Comments
 (0)