Files
eREQ/resources/schema.edn

2 lines
18 KiB
Clojure

(#:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :role/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :ident :role/name} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A message to display for invalid kit-ids", :ident :study/kit-id-validation-message} #:db{:valueType :db.type/tuple, :tupleTypes [:db.type/ref :db.type/boolean], :cardinality :db.cardinality/many, :doc "The sites a study is running at and their active statuses.", :ident :study/sites} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of the study (e.g. PICI0002).", :ident :study/name} #:db{:valueType :db.type/tuple, :tupleTypes [:db.type/ref :db.type/boolean], :cardinality :db.cardinality/many, :doc "The cohorts of participants in the study and their active statuses.", :ident :study/cohorts} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A message to display for invalid participant-ids", :ident :study/participant-id-validation-message} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this entity is active and should be displayed to users", :ident :study/active} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this entity was created", :ident :study/create-time} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "An initial prefix for this study's participant-ids", :ident :study/participant-id-prefix} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "An initial prefix for this study's kit-ids", :ident :study/kit-id-prefix} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :study/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A regex for validating kit-ids", :ident :study/kit-id-regex} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A regex for validating participant-ids", :ident :study/participant-id-regex} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :site/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a site", :ident :site/name} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this entity was created", :ident :site/create-time} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :shipment/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :ident :shipment/air-waybill} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this shipment has been archived", :ident :shipment/archived} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :form-value/uuid} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The form-type-field that this value belongs to", :ident :form-value/field} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "If this field is a string, then value will be stored here.", :ident :form-value/value_string} #:db{:valueType :db.type/long, :cardinality :db.cardinality/one, :doc "If this field is a long, then value will be stored here.", :ident :form-value/value_long} #:db{:valueType :db.type/float, :cardinality :db.cardinality/one, :doc "If this field is a float, then value will be stored here.", :ident :form-value/value_float} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "If this field is an instant (time), then value will be stored here.", :ident :form-value/value_instant} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this field is a boolean, then value will be stored here.", :ident :form-value/value_boolean} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :history/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The email address of the agent making the change", :ident :history/agent-email} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this change was made", :ident :history/time} #:db{:valueType :db.type/keyword, :cardinality :db.cardinality/one, :doc "The type of entity being changed", :ident :history/entity-type} #:db{:valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The id of the database entity being changed", :ident :history/entity-uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The old value of the entity being changed", :ident :history/old-value} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The new value of the entity being changed. Can be blank in the case of deletion", :ident :history/new-value} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :proposed-kit-edit/uuid} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The kit that this is proposing to edit", :ident :proposed-kit-edit/kit} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A stringified kit map that can be used to update the kit via the kit-shipment api", :ident :proposed-kit-edit/update-map} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/one, :doc "The status of this edit (e.g. pending, approved, or denied)", :ident :proposed-kit-edit/status} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The user proposing the edit.", :ident :proposed-kit-edit/user} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this edit was proposed.", :ident :proposed-kit-edit/time} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The user proposing the edit.", :ident :proposed-kit-edit/reviewing-user} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :sample-attribute/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a sample attribute", :ident :sample-attribute/name} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :sample/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The barcoded ID on this sample", :ident :sample/sample-id} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this sample was collected", :ident :sample/collected} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this sample was shipped", :ident :sample/shipped} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The sample-type that this sample is an instance of.", :ident :sample/sample-type} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The shipment that this sample was shipped in", :ident :sample/shipment} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "A kit usually has multiple samples collected for it. These are the types of samples that can be collected for this type of kit.", :ident :kit-type/sample-types} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "The timepoints this kit can be used for (e.g. Cycle 1 Day 1)", :ident :kit-type/timepoints} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a kit type (e.g. Blood Collection Kit).", :ident :kit-type/name} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The email address for the vendor this kit belongs to.", :ident :kit-type/vendor-email} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this entity was created", :ident :kit-type/create-time} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "Whether or not air waybill is required for this kit", :ident :kit-type/air-waybill-required} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "Whether or not collection timestamp is required for this kit", :ident :kit-type/collection-date-required} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :kit-type/uuid} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/one, :doc "Form-type stores custom form field definitions that need to be collected for a kit. Depending on how the kit is being used, a different form might need to be filled out.", :ident :kit-type/form-type} #:db{:unique :db.unique/identity, :valueType :db.type/long, :cardinality :db.cardinality/one, :doc "The external ID for a kit-type. Used as a unique ID and to join with Therapak.", :ident :kit-type/item-number} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :sample-type/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a sample type (e.g. Red Cap Serum)", :ident :sample-type/name} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A sample has a two part ID. The first part is the kit id that it belongs two, and the second part is this generic id-suffix.", :ident :sample-type/id-suffix} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If true, this sample is shipped out immediately by the site once the kit has been used. If false, the sample is kept by the site and might ship at a later date.", :ident :sample-type/ships-with-kit} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "A reminder about the sample to be displayed to the user. E.g. Please place tube only in Primary Bag or Cryobox", :ident :sample-type/reminder} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "Attributes for a sample (e.g. primary vs backup)", :ident :sample-type/attribute-values} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :sample-attribute-value/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a sample attribute value", :ident :sample-attribute-value/name} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The attribute this value belongs to", :ident :sample-attribute-value/attribute} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :cohort/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a cohort of participants (e.g. Default or Cohort B).", :ident :cohort/name} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The study this cohort belongs to", :ident :cohort/study} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time this entity was created", :ident :cohort/create-time} #:db{:valueType :db.type/tuple, :tupleTypes [:db.type/ref :db.type/boolean], :cardinality :db.cardinality/many, :doc "The types of kits that may be used for a cohort and their active statues.", :ident :cohort/kit-types} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "If this kit has been archived", :ident :kit/archived} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "The samples that were collected for this kit.", :ident :kit/samples} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The timezone for proper rendering of the timestamps that belong to this kit (e.g. America/Los_Angeles)", :ident :kit/timezone} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The site this kit was collected for.", :ident :kit/site} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/many, :doc "The timepoint this kit was collected for.", :ident :kit/timepoints} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The last name of the person completing this kit.", :ident :kit/completing-last-name} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "A timestamp for when this kit was collected. Defined by the person entering data into the form.", :ident :kit/collection-timestamp} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "A timestamp for when this kit was submitted.", :ident :kit/submission-timestamp} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "Comments about the kit.", :ident :kit/comments} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The email address of the person completing this kit.", :ident :kit/completing-email} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/many, :doc "Any shipments associated with this kit", :ident :kit/shipments} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The first name of the person completing this kit.", :ident :kit/completing-first-name} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The kit-type that this kit is an instance of.", :ident :kit/kit-type} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The ID of the participant that this kit is being used to collect samples from.", :ident :kit/participant-id} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The string identifier for this kit.", :ident :kit/kit-id} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "Whether or not this kit has been completed and submitted by the site.", :ident :kit/complete} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/one, :doc "The cohort this kit was collected for.", :ident :kit/cohort} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :kit/uuid} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "The values for the custom form fields defined in form-type collected for this kit.", :ident :kit/form-values} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :timepoint/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of the timepoint (e.g. Cycle 2 Day 3).", :ident :timepoint/name} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :form-type/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of a form. Different sample types can share the same form", :ident :form-type/name} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/many, :doc "The fields that belong to this form-type", :ident :form-type/fields} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :user/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :ident :user/email} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :ident :user/deactivated} #:db{:valueType :db.type/ref, :cardinality :db.cardinality/many, :doc "The roles that this user belongs to", :ident :user/roles} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :migration/uuid} #:db{:unique :db.unique/identity, :valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The name of the migration", :ident :migration/name} #:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :doc "The time the migration was made", :ident :migration/time} #:db{:unique :db.unique/identity, :valueType :db.type/uuid, :cardinality :db.cardinality/one, :doc "The UUID for the entity", :ident :form-type-field/uuid} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The id used for this field on forms", :ident :form-type-field/field-id} #:db{:valueType :db.type/ref, :isComponent true, :cardinality :db.cardinality/one, :doc "The type of field this is (e.g. boolean, int, time, string, select)", :ident :form-type-field/field-type} #:db{:valueType :db.type/boolean, :cardinality :db.cardinality/one, :doc "Whether or not this field is required", :ident :form-type-field/required} #:db{:valueType :db.type/string, :cardinality :db.cardinality/one, :doc "The label for this field", :ident :form-type-field/label} #:db{:valueType :db.type/tuple, :tupleTypes [:db.type/string :db.type/string], :cardinality :db.cardinality/many, :doc "If this field is a select field, tuples of (id, value) for the select field", :ident :form-type-field/options} #:db{:ident :form-type-field-type/boolean, :doc "boolean"} #:db{:ident :form-type-field-type/int, :doc "int"} #:db{:ident :form-type-field-type/time, :doc "time"} #:db{:ident :form-type-field-type/select, :doc "select"} #:db{:ident :form-type-field-type/string, :doc "string"} #:db{:ident :kit-edit-status/pending, :doc "pending"} #:db{:ident :kit-edit-status/approved, :doc "approved"} #:db{:ident :kit-edit-status/denied, :doc "denied"})