Tables Tables

NameDescription
dbo.AlertHolds instances of alerts.  These are usually produced by stored procedures with name Rule*, but they can also be added from applications with decision support, or by users themselves.  Based on the values of PersonId, UserId and StudyId (all of which are nullable), an alert could be made local to a study, a user or a patient, or all of them, or global (all fields null).
dbo.AlertResponseHolds instances of responses to alerts.  Every time a button is clicked in an alert, a row is stored here.  There can be multiple responses per alert, e.g. if it is postponed and reappers later.
dbo.CaseLogKeeps a history of certain events related to a person.  This log should not be changed, only appended to, so the LogId could be removed with no effects.
dbo.CaveLogKeeps a history of edits done to the CAVE field in the Person table.  There is no primary key, because data in this table should never be changed, only added one row at at time.
dbo.ClinEventHolds instances of Clincal Events. The Clinical Forms are children of events.

Future changes:
a) Classify events, like "Outpatient visit", "Telephone call" etc.
b) Connect to a StudCaseId instance by FK, instead of FKs to StudyId and PersonId separately.
dbo.ClinFormHolds instances of Clinical Forms.  There must be one row for every form instance, and every form instance is the child of exactly one Clincal Event instance.

Future changes:
 a) Field MemoHeight will be removed.
dbo.ClinFormLogThis table keeps a log of old versions of the Comment attribute of ClinForm. It is currently updated with UpdateFormComment, but in the future a trigger will probably be used.
dbo.ClinLogKeeps track of old (changed) data from the ClinObservation table.  This table is updated automatically as needed via the AddClinData procedure, and should never be written to directly.

Future changes:
a) Changes done via triggers instead of via AddData procedure.
dbo.ClinObservationStores current clinical data for a patient.  Old data that has been overwritten is stored in ClinLog.
dbo.ClinProblemHolds instances of clinical problems, that is problems connected to a certain Person.
dbo.ClinProblemInstance
dbo.ClinRelationHolds instances of relations between a Person and a User.  These relations define what a User can do to a Person, e.g. whether the User has access to a Persons files or not.
dbo.ClinTouchStores write tokens (TouchId).  A TouchId is needed to write data to the ClinObservation table (via the AddClinData procedure).
dbo.DbProcListKeeps track of classes of  procedures in the database.  One use for this table is to keep track of procedures to select certain subpopulations, like active patients, patients taking a certain medication etc.
dbo.DbUpgradeLogKeeps track of when this database was updated, and by whom.
dbo.DrugDosingKeeps track of the details of drug dosing, with Master-Detail relationship to DrugTreatment.
dbo.DrugPauseKeeps track of pauses that have been made in drug treatments.  Refers to treatments in DrugTreatment table.
dbo.DrugReactionKeeps track of adverse drug reactions.
dbo.DrugReasonReasons for starting and stopping a drug.  The table is built by the application, but could also be prepopulated from indication list.
Future changes:
 a) Keep track of popularity of the various reasons, to allow the most popular one to be preselected when entering drug orders.
 b) Use INT for CreatedBy.
dbo.DrugTemplateTemplate for drug treatments.  This table is populated by AddDrugTemplate and AddDrugTemplateByExample.
dbo.DrugTreatmentHolds instances of drug treatments, that is drug treatments prescribed for a certain Person.
dbo.DSSRuleHolds instances of decision support rules.  Each rule is a stored procedure that normally begins with Rule*.  A Rule can be applied to a Person in a Study.
dbo.DSSRuleExecuteLog of execution of DSSStudyRule.  Can be used to see how much time is spent executing the rules.  This can be useful for optimization.
dbo.DSSStudyRuleLink table that connects a DSSRule to a Study, and allows it to be set to Active or not Active.
dbo.ImportBatchHolds a list of batches of data that has been imported.  To rollback a batch, simply delete a row in this table.
dbo.ImportContextHolds a list of various import situations.
dbo.KBAtcIndexKnowledge base data from the drug interaction database DRUID.  Data in this table is downloaded from http://druid.emetra.no, and should never be changed locally.
dbo.KBDrugToProblemKnowledge base data connecting drugs to problems, allowing the DSS to prompt the user to add a problem to the problem list, if a certain treatment indicates that a problem is present.
dbo.KBInteractionKnowledge base data from the drug interaction database DRUID.  Data in this table is downloaded from http://druid.emetra.no and should never be changed locally.
dbo.KBMetaMemberKnowledge base data from the drug interaction database DRUID.  Data in this table is downloaded from http://druid.emetra.no, and should never be changed locally.
dbo.LabCodeLocally generated metadata that holds all lab names used in LabData.
dbo.LabCodeGroupSpecifies which LabCode goes into which LabGroup.
dbo.LabDataLaboratory data.  Future change: Will be integrated into ClinObservation and replaced with a view.
dbo.LabGroupGroups of labdata.  Future changes: Replace with centrally managed MetaLabGroup?
dbo.LabReqHolds instances of Lab orders.
dbo.LabReqTestHolds lists of LabCodes ordered for a certain LabReq
dbo.MetaDevResultLookup list for the different ways that LabData can be marked as a non-normal resut (deviation).  Lookup values are from KITH, http://www.volven.no, OID=8244, and also mapped to OID=9533.  We have added value 0, because this is required to support both 8244 and 9533, which seem to have the same purpose.
dbo.MetaFormLookup list of all classes of ClinicalForm that are known to the system.
dbo.MetaFormStatusLookup list for the the different states a ClinicalForm can have.
dbo.MetaGenderLookup list for valid GenderId values for a Person.
dbo.MetaNomItemLookup list for all possible Code - Value pairs for all NOM lists.  To avoid duplication codes between new versions of NOM lists, every Code - Value pair is stored only once.  The relation between a pair and an actual NOM list is stored in MetaNomListItem.
dbo.MetaNomListLookup list of other lookup lists that have data of the type NOM (LOINC Scale).
dbo.MetaNomListItemLookup list that connects a Code - Value pair (MetaNomItem) to a list (MetaNomList).  This table decides which Code - Value pairs that are part of a particular vocabulary, like "Norwegian ICPC-2, 2008 version".
dbo.MetaPackTypeLookup list for ways that a drug can be packaged for delivery, like Multidose, Dosette, Original or Unspecified.
dbo.MetaProblemTypeLookup list for problem types, which is an attribute of ClinProblem.
dbo.MetaProfessionLookup list for professions that the a user can belong to.
dbo.MetaReasonTypeLookup list for reason types.  A reason is either a reason to start a drug, or to stop a drug.  In the future, it could be expanded to hold other reasons as well.
dbo.MetaRelatednessLookup list for the degree of relation between an Adverse Drug Event (DrugReaction) and a DrugTreatment.
dbo.MetaRelationLookup list for valid relations to be stored in ClinRelation.  What relations are valid depends on the profession (MetaProfession) of the User.
dbo.MetaResolutionLookup list for the status for a Person after a DrugReaction to a DrugTreatment.
dbo.MetaSeverityLookup table for severity of an Adverse Drug Event. ADEs are stored in the table DrugReaction.
dbo.MetaTreatPackGroupGives names to certain combinations of MetaTreatType and MetaPackType.  
dbo.MetaTreatTypeLookup list for treatment types.  These could include As needed (Behov), Standing order (Fast) or Temporal order (Kur).
dbo.MetaAlertActionLookup table for the different actions that may be taken based on an Alert instance.
dbo.MetaAlertFacetLookup list for valid AlertFacet in table Alert.
dbo.MetaAlertLevelLookup list for valid AlertLevel in table Alert.
dbo.PersonHolds instances of Person.  This table should be kept deliberately simple, as there are very few attributes of a Person that will not change over time.  Date of birth, Name, and Sex are some of them.  Other types of data could be stored in Clinical Forms.
dbo.StudCaseKeeps a list of relations between a study and a person, the persons status in the study, and which group the person belongs to.  Also keeps list of primary investigator for this person.
dbo.StudCaseLogKeeps track of changes done to a StudCase, like status changes, group changes and who was responsible when.
dbo.StudyHolds instances of Study that this database is aware of.  They may or may not be in use.  The StudyId is local to this database, but the StudName is based on metadata from http://meta.emetra.no.
dbo.StudyCenterHolds a list of all user sites that this installation is aware of.  There can be more sites than the users in this particular database.  In the future, this table can hold institutions in general.
dbo.StudyGroupStores the valid groups for a particular study.  The group can be something like a ward in a nursing home.  Groups are local to a Center (see StudyCenter).
dbo.StudyStatusStores the valid status values for a study.  Status can be "dead", "active", "moved" or similar.  Statuscodes belong to a protocol (Study), and are shared between different StudyCenters.
dbo.StudyUserStores information about a User in the context of a particular Study.
dbo.TextItemsStores text used in alerts and other places.  Translation of the database must include translating the TextValues in this table.
dbo.UserListStores relationships between a Person and a UserId.  A lot of tables have foreign key relations to this table, thereby enforcing that all users must identify themselves as an entry in the Person table.

This table is usually populated with the procedures AddMyself or AddUser.
dbo.UserLogKeeps a log of all user sessions.