-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd_storage.R
154 lines (132 loc) · 4.84 KB
/
dd_storage.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
storage<-
list(
# data.frame(
# Variable="StorageID",
# Label="Storage Identifier",
# Definition="System-provided Storage identifier",
# Type="Integer",
# Mandatory="System-assigned"),
data.frame(
Variable="StorageChange",
Label="Storage Change",
Definition="Answer to the question: 'Is this storage record a consequence of changes in the storage of
the Carcass or Specimen?'",
Type="Boolean",
Mandatory="Yes"),
data.frame(
Variable="StorageChangeDate",
Label="Storage Change Date",
Definition="The date when the storage change occured. If the change is associated with an Export, then
this attribute is the date when the exported material was stored in the new facility",
Type="Date",
Mandatory="Yes"),
data.frame(
Variable="StorageChangeReason",
Label="Storage Change Reason",
Definition="Description of the reason to change the storage of the Carcass or Specimen",
Type="String",
Mandatory="Yes"),
# data.frame(
# Variable="StorageChangeExportID",
# Label="Storage Change Export ID",
# Definition="The Id of the Export leading to a change in the storage of the Carcass or Specimen.
# The exportation process in this case must have occurred before the storage change",
# Type="Integer",
# Mandatory="Yes"),
data.frame(
Variable="SpecimenCurrentQuantityStored",
Label="Specimen Current Quantity Stored",
Definition="The quantity of Specimen currently stored (e.g., 0.3)",
Type="Float",
Mandatory="Yes"),
data.frame(
Variable="SpecimenReasonQuantityDifference",
Label="Specimen Reason of Quantity Difference",
Definition="Explanantion for the difference between the original Specimen amount
and the current Specimen amount stored",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="StorageType",
Label="Storage Type",
Definition="The type of storage of the Carcass or Specimen (e.g., in tank of liquid nitrogen, frozen, etc.)",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="StorageFacilityStorage",
Label="Storage Facility",
Definition="The facility where the Carcass or Specimen is stored",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="StorageFacilityStorageContact",
Label="Storage Facility Contact",
Definition="The person of contact in the facility where the Carcass or Specimen is stored",
Type="Single selection",
Mandatory="Yes"),
data.frame(
Variable="StorageBuilding",
Label="Storage Building",
Definition="The specific building within the facility where the Carcass or Specimen is stored",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageRoom",
Label="Storage Room",
Definition="The specific room within the facility building where the Carcass or Specimen is stored",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageStorage",
Label="Storage Unit",
Definition="The specific storage unit within the building room building where the Carcass or Specimen is stored (e.g., refrigerator 'X')",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageShelf",
Label="Storage Shelf",
Definition="The specific shelf within the storage unit where the Carcass or Specimen is stored",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageRack",
Label="Storage Rack",
Definition="The specific rack within the shelf where the Carcass or Specimen is stored",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageBox",
Label="Storage Box",
Definition="The specific box within the rack where the Carcass or Specimen is stored",
Type="String",
Mandatory="No"),
data.frame(
Variable="StorageRow",
Label="Storage Row",
Definition="The specific row within the box where the Carcass or Specimen is stored",
Type="Integer",
Mandatory="No"),
data.frame(
Variable="StorageProblemsInFacility",
Label="Storage Problems in Facility",
Definition="Description of any problems regarding the storage of the Carcass or Specimen within the facility",
Type="String",
Mandatory="Yes"),
data.frame(
Variable="StorageComments",
Label="Storage Comments",
Definition="Any other comments regarding the Storage",
Type="String",
Mandatory="No"))
storage<-
storage %>% bind_rows() |>
gt::gt() %>%
gt::tab_options(table.font.size = 8) %>%
gt::cols_width(Variable ~ gt::pct(22),
Label ~ gt::pct(20),
Definition ~ gt::pct(30),
Type~ gt::pct(13),
Mandatory~ gt::pct(15)) %>%
gt::tab_style(
style = cell_text(size = px(15), weight = "bold"),
locations = cells_column_labels())