Database tables
Daftar isi
accesslogTrack web access CREATE TABLE accesslog ( sessionstart timestamp without time zone NOT NULL DEFAULT now(), screeny integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.accesslog_id_seq'::regclass), sessionid character varying, userid integer, httpuseragent text, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer, del boolean NOT NULL DEFAULT false, sessionend timestamp without time zone, screenx integer ); |
adminlevelsSpatial administrative unit levels (province, district etc) CREATE TABLE adminlevels ( createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.adminlevels_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users ); |
afkirCulling activities CREATE TABLE afkir ( createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, locationid integer NOT NULL REFERENCES locations, jumlah integer NOT NULL, speciesid integer NOT NULL REFERENCES species, programafkirid integer NOT NULL REFERENCES programafkir, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.afkir_id_seq'::regclass) ); |
agesAnimal age categories CREATE TABLE ages ( modifiedon timestamp without time zone, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.ages_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users ); |
ageunitsUnits for age measurement CREATE TABLE ageunits ( code character varying NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, modifiedon timestamp without time zone, days integer, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.ageunits_id_seq'::regclass), modifiedby integer REFERENCES users ); |
aireportanimalsCREATE TABLE aireportanimals ( userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.aireportanimals_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, totaldead integer NOT NULL, speciesid integer NOT NULL REFERENCES species, aireportsid integer NOT NULL REFERENCES aireports, msgid bigint NOT NULL ); |
aireportsCREATE TABLE aireports ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, productionsystemid integer NOT NULL REFERENCES productionsystems, createdby integer NOT NULL DEFAULT 1 REFERENCES users, backyard boolean NOT NULL DEFAULT true, createdon timestamp without time zone NOT NULL DEFAULT now(), caseid integer NOT NULL REFERENCES cases, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.aireports_id_seq'::regclass) ); |
alasanpenolakanalasan penolakan pemotongan CREATE TABLE alasanpenolakan ( modifiedby integer, id integer PRIMARY KEY NOT NULL, name character varying[] NOT NULL, code character varying, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
animal_typesAnimal type classification for slaughter and population CREATE TABLE animal_types ( age integer REFERENCES ages, productive boolean, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, population boolean NOT NULL DEFAULT true, origin at_origin, purpose at_purpose, sex at_sex, species integer REFERENCES species, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.animal_types_id_seq'::regclass), code character varying UNIQUE NOT NULL, hiercode character varying UNIQUE, slaughter boolean NOT NULL DEFAULT false ); |
animalidCREATE TABLE animalid ( id integer ); |
animalsAnimals in a laboratory submission. On submission may include several animals from several different owners CREATE TABLE animals ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, sexid integer REFERENCES sex, speciesid integer NOT NULL REFERENCES species, animalid bigint REFERENCES hewan, ownerid integer REFERENCES owners, animalident character varying NOT NULL, labsubmissionid integer NOT NULL REFERENCES labsubmissions, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.animals_id_seq'::regclass), modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, age double precision, msgid bigint, ageunitsid integer REFERENCES ageunits ); |
animalsList of animal that registered by Satgas PMK CREATE TABLE animals ( visitor_id integer NOT NULL REFERENCES farm_visits, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.animals_id_seq'::regclass), total integer NOT NULL, farmer_id integer NOT NULL REFERENCES farmers, status_id integer NOT NULL REFERENCES status_pmk, species_id integer NOT NULL REFERENCES species, signs integer[], del boolean NOT NULL DEFAULT false, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users ); |
antemortemPemeriksaan antemortem di RPH CREATE TABLE antemortem ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.antemortem_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), skkh text, idpemilik integer NOT NULL REFERENCES users, identifikasi character varying NOT NULL, animaltypeid integer NOT NULL REFERENCES animal_types, iddiagnosa integer NOT NULL REFERENCES diseases, idsigns integer[] NOT NULL, idkeputusanam integer NOT NULL REFERENCES keputusanam, infrastructureid integer NOT NULL REFERENCES infrastructure, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL ); |
apifieldsCREATE TABLE apifields ( paramtypeid integer REFERENCES apiparamtypes, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apifields_id_seq'::regclass), apiid integer NOT NULL REFERENCES apis, name character varying NOT NULL ); |
apioperationsCREATE TABLE apioperations ( name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apioperations_id_seq'::regclass), modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false ); |
apiparamtypesCREATE TABLE apiparamtypes ( regex character varying NOT NULL, modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apiparamtypes_id_seq'::regclass) ); |
apisCREATE TABLE apis ( operationid integer NOT NULL REFERENCES apioperations, description character varying NOT NULL, name character varying NOT NULL, permissionid integer NOT NULL REFERENCES permission_types, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, createdon timestamp with time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('apis_id_seq'::regclass), modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users ); |
apisqlCREATE TABLE apisql ( createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, serverid integer NOT NULL REFERENCES servers, sql character varying NOT NULL, natorder integer NOT NULL DEFAULT 1, apiid integer NOT NULL REFERENCES apis, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apisql_id_seq'::regclass), createdon timestamp with time zone NOT NULL DEFAULT now() ); |
app_downloadsThis table is for logging downloads. This is the only table that the app_downloads user can actually do anything other than read. CREATE TABLE app_downloads ( createdby integer NOT NULL DEFAULT 1, modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_downloads_id_seq'::regclass), userid integer NOT NULL, reportid integer NOT NULL, outcome character varying, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
app_projectsThis table holds project definitions for delivery by the app.php action CREATE TABLE app_projects ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_projects_id_seq'::regclass), name character varying[] NOT NULL, description character varying[] NOT NULL, projectdefinition json, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
app_reportsThis field holds the full json string for the app download. CREATE TABLE app_reports ( modifiedby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_reports_id_seq'::regclass), name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, description character varying[] NOT NULL, reportdefinition json, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 ); |
app_reportsThis table holds reports for delivery by the app.php action CREATE TABLE app_reports ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_reports_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, name character varying[] NOT NULL, description character varying[] NOT NULL, reportdefinition json ); |
app_staticThis table holds static data for delivery by the app.php action CREATE TABLE app_static ( sql character varying, version integer NOT NULL DEFAULT 1, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, description character varying[] NOT NULL, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_static_id_seq'::regclass) ); |
apphelpCREATE TABLE apphelp ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.apphelp_id_seq'::regclass), appid integer NOT NULL DEFAULT 1, pageid integer NOT NULL, pageref character varying, help character varying[], createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false ); |
asalbibitOrigin of seed for forage crops CREATE TABLE asalbibit ( id integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, code character varying, name character varying[] NOT NULL, modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
asuransihewanEvents table for an individual animal, used to store a range of different event types CREATE TABLE asuransihewan ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.asuransihewan_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), idhewan bigint REFERENCES hewan, idstatusasuransi integer REFERENCES statusasuransi, nomor numeric NOT NULL, masaawal date, masaakhir date, nilai bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL ); |
audit_trailAudit trail to log user model activity CREATE TABLE audit_trail ( user_name character varying(50), model_id character varying(255), field character varying(50), model character varying(100), new_value character varying, action character varying(200), user_id integer REFERENCES users, old_value character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('audit_trail_id_seq'::regclass), stamp timestamp without time zone DEFAULT CURRENT_TIMESTAMP, browser character varying(255), url_referer character varying(150), ip_address character varying(25) ); |
audit_trail_detailAudit trail detail to log model activity CREATE TABLE audit_trail_detail ( model_id character varying(255), field character varying(255), model character varying(100), stamp timestamp without time zone DEFAULT CURRENT_TIMESTAMP, user_id integer REFERENCES users, audit_trail_id integer REFERENCES audit_trail, action character varying(255), new_value character varying, old_value character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('audit_trail_detail_id_seq'::regclass), ip_address character varying(25), url_referer character varying(150), browser character varying(255), user_name character varying(50) ); |
auth_assignmentCREATE TABLE auth_assignment ( data text, itemname character varying(64) PRIMARY KEY NOT NULL, userid character varying(64) PRIMARY KEY NOT NULL, bizrule text ); |
auth_itemCREATE TABLE auth_item ( type integer NOT NULL, description text, name character varying(64) PRIMARY KEY NOT NULL, bizrule text, data text ); |
auth_item_childCREATE TABLE auth_item_child ( parent character varying(64) NOT NULL, child character varying(64) NOT NULL ); |
batchCREATE TABLE batch ( populasi_akhir integer, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, createdby integer NOT NULL REFERENCES users, tanggalakhir date, populasi_awal integer NOT NULL, tanggalmulai date NOT NULL, idspecies integer NOT NULL REFERENCES species, idfarm integer NOT NULL REFERENCES farms, idbatch character varying(255) NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('batch_id_seq'::regclass) ); |
bcsReference table for the BCS categories and the corresponding intervals CREATE TABLE bcs ( modifiedby integer REFERENCES users, nilai character varying NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.bcs_id_seq'::regclass), del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
bmindotempprovCREATE TABLE bmindotempprov ( validto date, id integer, name character varying, code locationcode, centroid_proj public.geometry(Point,3857), temp boolean, bpscode character varying, level integer, validfrom date, geom public.geometry(MultiPolygon,4326), centroid public.geometry(Point,4326), createdby integer, createdon timestamp without time zone, modifiedby integer, modifiedon timestamp without time zone, del boolean, comment text, geom_proj public.geometry(MultiPolygon,3857) ); |
brewerpalettesColour definitions for charts CREATE TABLE brewerpalettes ( code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.brewerpalettes_id_seq'::regclass), name character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
brosurCREATE TABLE brosur ( cover_image character varying(255), document character varying(255), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, description text, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('brosur_id_seq'::regclass), title character varying(255) NOT NULL ); |
businessrulesBusiness rules definining custom actions to be taken during data processing CREATE TABLE businessrules ( sql character varying, rulefunction character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.businessrules_id_seq1'::regclass), name character varying, ruleorder integer, caller character varying, hook hook, description character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL ); |
businessrulesoldCREATE TABLE businessrulesold ( caller character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, sql character varying, rulefunction character varying, ruleorder integer, hook hook, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.businessrules_id_seq'::regclass) ); |
cached_reportCREATE TABLE cached_report ( modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL, last_update character varying(255), filename character varying(255) UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('cached_report_id_seq'::regclass) ); |
cadrereportsA dummy table for testing of the spreadsheet parsing CREATE TABLE cadrereports ( syndrome integer REFERENCES syndromes, signids integer[], createdby integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cadrereports_id_seq'::regclass), msgid character varying NOT NULL, reportdate date NOT NULL, location integer NOT NULL REFERENCES locations, speciesid integer NOT NULL REFERENCES species, modifiedby integer, modifiedon timestamp with time zone NOT NULL DEFAULT now(), numcases integer NOT NULL, createdon timestamp with time zone NOT NULL DEFAULT now() ); |
cadreresponsesA dummy table for testing of the spreadsheet parsing CREATE TABLE cadreresponses ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cadreresponses_id_seq'::regclass), diagnosis integer[] NOT NULL, responsedate date NOT NULL, msgid character varying NOT NULL, caseid parentlink NOT NULL REFERENCES cadrereports, modifiedby integer, modifiedon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, createdon timestamp with time zone NOT NULL DEFAULT now(), otherdiagnosis character varying ); |
case_animalsIndividual animals in a disease case CREATE TABLE case_animals ( modifiedon timestamp without time zone, del boolean DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.case_animals_id_seq'::regclass), idcase integer NOT NULL REFERENCES cases, idhewan integer NOT NULL REFERENCES hewan, msgid bigint, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
caseimagesImages from a disease case CREATE TABLE caseimages ( caseid integer REFERENCES cases, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.caseimages_id_seq'::regclass), msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, image character varying NOT NULL ); |
caseresultsOutcome of a case (resolved, died, still sick) CREATE TABLE caseresults ( jumlah integer, msgid bigint NOT NULL, caseid integer NOT NULL REFERENCES cases, result integer NOT NULL REFERENCES caseresulttypes, createdby integer NOT NULL DEFAULT 1 REFERENCES users, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.caseresults_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
caseresulttypesOutcomes of clinical cases CREATE TABLE caseresulttypes ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, modifiedby integer REFERENCES users, code character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.caseresulttypes_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1 REFERENCES users, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false ); |
casesMaster table for all field disease cases CREATE TABLE cases ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, locationid integer NOT NULL REFERENCES locations, msgid bigint NOT NULL, validation boolean NOT NULL DEFAULT false, validationon timestamp without time zone, validationby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cases_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone ); |
coldstorageCREATE TABLE coldstorage ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('coldstorage_id_seq'::regclass), idinfra integer NOT NULL, nkv character varying, statuskepememilikan integer NOT NULL, operationalend_date date, chiller_ton double precision, coldstorage_ton double precision, idrphu integer, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, del boolean NOT NULL DEFAULT false ); |
coldstorage_stockCREATE TABLE coldstorage_stock ( producttypes integer, stockin double precision NOT NULL, stockout double precision NOT NULL, endstock double precision NOT NULL, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL, idcs integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('coldstorage_stock_id_seq'::regclass) ); |
compartement_negativereportsCREATE TABLE compartement_negativereports ( checked boolean, reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('compartement_negativereports_id_seq'::regclass), msgid bigint NOT NULL ); |
compartment_disease_casesCREATE TABLE compartment_disease_cases ( msgid bigint NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('compartment_disease_cases_id_seq'::regclass), persentase integer, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, cases integer NOT NULL, farmid integer NOT NULL REFERENCES farms, signsid integer[] NOT NULL, diagnosisid integer[] NOT NULL, diseaseid integer, userid integer NOT NULL REFERENCES users ); |
containershipmentCREATE TABLE containershipment ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, total integer NOT NULL, kondisikontainerid integer REFERENCES kondisikontainer, jeniskontainerid integer REFERENCES jeniskontainer, stocktakeid integer REFERENCES stocktake, receiptid integer REFERENCES receipt, shipmentid integer REFERENCES shipments, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.containershipment_id_seq'::regclass) ); |
dashboard_reportCREATE TABLE dashboard_report ( createdon timestamp with time zone, createdby integer, del boolean, active boolean, order integer, modelid integer, name character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.dashboard_report_id_seq1'::regclass), sql text, modifiedon timestamp with time zone, modifiedby integer, jsonobj json, typereport text ); |
dashboard_report_userCREATE TABLE dashboard_report_user ( id_user integer, id_report integer[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.dashboard_report_user_id_seq'::regclass) ); |
dashboard_widgetCREATE TABLE dashboard_widget ( order integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.dashboard_widget_id_seq'::regclass), userid integer NOT NULL REFERENCES users, reportid integer NOT NULL REFERENCES reports, widgettype character varying DEFAULT 'widget'::character varying, modifiedon timestamp with time zone, modifiedby integer, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, del boolean NOT NULL DEFAULT false ); |
datatablesCREATE TABLE datatables ( createdon timestamp without time zone NOT NULL DEFAULT now(), displayname character varying[] NOT NULL, tblname character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.datatables_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone, modifiedby integer, del boolean NOT NULL DEFAULT false, parenttbl integer REFERENCES datatables ); |
daterangetypesPre-defined date ranges for reporting CREATE TABLE daterangetypes ( createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, del boolean NOT NULL DEFAULT false, startdate character varying, enddate character varying, sortorder integer, description character varying DEFAULT '{"", ""}'::character varying, sql text, name character varying[] UNIQUE NOT NULL DEFAULT '{"",""}'::character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.daterangetypes_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now() ); |
deleted_vaccination_logsLogs of deleted vaccination individu CREATE TABLE deleted_vaccination_logs ( deletedat timestamp without time zone DEFAULT CURRENT_TIMESTAMP, id integer PRIMARY KEY NOT NULL DEFAULT nextval('deleted_vaccination_logs_id_seq'::regclass), deletedby integer NOT NULL REFERENCES users, vaccination_id integer NOT NULL REFERENCES vaccination_individu, description character varying(255) ); |
deskripsihewanDescription of an animal for individual animal identification CREATE TABLE deskripsihewan ( warna integer REFERENCES warna, tanduk character varying, createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.deskripsihewan_id_seq'::regclass), modifiedon timestamp without time zone, idhewan bigint REFERENCES hewan, del boolean NOT NULL DEFAULT false, cap character varying ); |
device_token_usersCREATE TABLE device_token_users ( createdby integer NOT NULL REFERENCES users, endpoint character varying(255) NOT NULL, token character varying(255) NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('device_token_users_id_seq'::regclass) ); |
diagnosesDefinitive diagnosis for cases. May be submitted as part of lab submission or by field SMS. CREATE TABLE diagnoses ( createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.diagnoses_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, diseaseid integer NOT NULL REFERENCES diseases, labsubmissionid integer REFERENCES labsubmissions, msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users ); |
disease_detailsCREATE TABLE disease_details ( createdby integer NOT NULL REFERENCES users, species integer[], name character varying[] NOT NULL, other_names character varying[], description character varying[], del boolean NOT NULL DEFAULT false, diseaseid integer REFERENCES diseases, prevention character varying[], treatment character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.disease_details_id_seq'::regclass), diagnosis character varying[], modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
disease_parent_speciesCREATE TABLE disease_parent_species ( disease_id integer NOT NULL REFERENCES diseases, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, parent_species_id integer NOT NULL REFERENCES parent_species, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('disease_parent_species_id_seq'::regclass) ); |
disease_statusCREATE TABLE disease_status ( disease_isikhnas_id integer NOT NULL REFERENCES diseases, location_id integer NOT NULL REFERENCES locations, is_special_condition boolean NOT NULL DEFAULT false, status character varying(10) NOT NULL, disease_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('disease_status_id_seq'::regclass) ); |
diseaseeventsMaster table of major disease events, used to group cases and programs CREATE TABLE diseaseevents ( enddate date, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, area integer[], diseaseid integer REFERENCES diseases, startdate date NOT NULL DEFAULT now(), name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.diseaseevents_id_seq'::regclass) ); |
diseasesMaster list of diseases CREATE TABLE diseases ( name character varying[] NOT NULL, synonym integer, priority boolean NOT NULL DEFAULT false, prevalence real, exotic boolean NOT NULL DEFAULT false, main boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, zoonotic boolean NOT NULL DEFAULT false, synname character varying[], createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), strategic boolean NOT NULL DEFAULT false, contagious boolean NOT NULL DEFAULT false, oie boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.diseases_id_seq'::regclass), code character varying UNIQUE NOT NULL ); |
diseasesignsProbabiilty matrix of the occurrence of different signs with different diseases CREATE TABLE diseasesigns ( prob real NOT NULL DEFAULT 0.5, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, signid integer NOT NULL REFERENCES signs, diseaseid integer NOT NULL REFERENCES diseases, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.diseasesigns_id_seq'::regclass) ); |
diseasespeciesSpecies susceptible to different diseases CREATE TABLE diseasespecies ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, speciesid integer NOT NULL REFERENCES species, diseaseid integer NOT NULL REFERENCES diseases, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.diseasespecies_id_seq'::regclass), modifiedon timestamp without time zone, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false ); |
distribusistrawCREATE TABLE distribusistraw ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, tujuan integer NOT NULL REFERENCES locations, asal integer NOT NULL REFERENCES locations, tanggal timestamp without time zone NOT NULL DEFAULT now(), jumlah integer NOT NULL, idstraw character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.distribusistraw_id_seq'::regclass), del boolean NOT NULL DEFAULT false ); |
drugclassesClassification of drugs by regulation status CREATE TABLE drugclasses ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.drugclasses_id_seq'::regclass), name character varying[] NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
drugsMaster table of registered and other drugs CREATE TABLE drugs ( doseunits units, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.drugs_id_seq'::regclass), drugtypeid integer NOT NULL REFERENCES drugtypes, code character varying, hiercode character varying, name character varying NOT NULL, regnumber character varying, regyear integer, di character(1), bfpl character(1), manufacturer character varying, licensee character varying, composition character varying, class integer REFERENCES drugclasses, packaging character varying, indication character varying, comments character varying, synonym integer, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, paravet boolean NOT NULL DEFAULT false, reg_institution reg_institution DEFAULT 'KEMENTAN'::reg_institution ); |
drugtypesClassification of drugs by functional group CREATE TABLE drugtypes ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.drugtypes_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, synonym integer, name character varying[] NOT NULL, hiercode character varying UNIQUE NOT NULL, code character varying UNIQUE NOT NULL ); |
ekspor_pencucian_waletekspor_pencucian_walet CREATE TABLE ekspor_pencucian_walet ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('ekspor_pencucian_walet_id_seq'::regclass), infra_id integer NOT NULL, negara_tujuan character varying NOT NULL, volume_kg double precision, rupiah double precision, tahun integer NOT NULL, triwulan integer NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
emailnotificationsCREATE TABLE emailnotifications ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.emailnotifications_id_seq'::regclass), modifiedby integer, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 0, recipient character varying, unsubscribeurl character varying, topicarn character varying, signingcerturl character varying, messageid character varying, type character varying, signature character varying, signatureversion character varying, notificationtime timestamp with time zone, message jsonb, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
errorsLog of SMS format errors CREATE TABLE errors ( receivedtime timestamp without time zone, message character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.errors_id_seq'::regclass), userid integer NOT NULL REFERENCES users ); |
estrusCREATE TABLE estrus ( reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.estrus_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, animals integer NOT NULL DEFAULT 1 ); |
eventcaseLink table to associate multiple cases with a single major disease event CREATE TABLE eventcase ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.eventcase_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, diseaseeventid integer NOT NULL REFERENCES cases, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
exportreferencenamedrangesDefinition of Excel named ranges for the reference table export system CREATE TABLE exportreferencenamedranges ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.exportreferencenamedranges_id_seq'::regclass), tabid integer NOT NULL REFERENCES exportreferencetabs, rangename character varying NOT NULL, range character varying NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false ); |
exportreferencesMaster table for the reference table export system CREATE TABLE exportreferences ( createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, filename character varying, listsql character varying, replysql character varying, listname character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.exportreferences_id_seq'::regclass), name character varying[] NOT NULL ); |
exportreferencetabsTab (worksheet) content definition for the reference table export system CREATE TABLE exportreferencetabs ( modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, sql character varying NOT NULL, tabname character varying NOT NULL, exportreferenceid integer NOT NULL REFERENCES exportreferences, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.exportreferencetabs_id_seq'::regclass), sortorder integer NOT NULL DEFAULT 1, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users ); |
farm_detailsCREATE TABLE farm_details ( jenis_usaha_id integer NOT NULL REFERENCES jenis_usaha, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farm_details_id_seq'::regclass), farm_id integer NOT NULL REFERENCES farms ); |
farm_hewanCREATE TABLE farm_hewan ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, createdby integer NOT NULL REFERENCES users, tanggalakhir date, tanggalmulai date NOT NULL, idhewan integer NOT NULL REFERENCES hewan, idfarm integer NOT NULL REFERENCES farms, del boolean NOT NULL DEFAULT false ); |
farm_visitsVisited list identification by Satgas PMK CREATE TABLE farm_visits ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farm_visits_id_seq'::regclass), farmer_id integer NOT NULL REFERENCES farmers, visited_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP, visited_by integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users ); |
farmersList of farmers that registered by Satgas PMK CREATE TABLE farmers ( centroid public.geometry(Point,4326), modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, del boolean NOT NULL DEFAULT false, status_id integer NOT NULL REFERENCES status_pmk, address character varying(255), location_id integer NOT NULL REFERENCES locations, nik character varying(16) NOT NULL, phone phonenumber NOT NULL, name character varying(255) NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farmers_id_seq'::regclass) ); |
farmsCREATE TABLE farms ( code character varying(255), idspecies integer NOT NULL REFERENCES species, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farms_id_seq'::regclass), national_code character varying(255) NOT NULL, locationid integer REFERENCES locations, address text, geom public.geometry(Point,4326), lat double precision, lon double precision, farm_types farm_types NOT NULL, idpemilik integer NOT NULL REFERENCES users, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
favoritereportCREATE TABLE favoritereport ( title character varying[] NOT NULL, del boolean DEFAULT false, modifiedby integer, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), displayorder integer, parent integer NOT NULL, type character varying NOT NULL, menuaction character varying NOT NULL, label character varying[] NOT NULL, reportid integer NOT NULL REFERENCES reports, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.favoritereport_id_seq'::regclass) ); |
fieldtypesOriginally this table was intended to define datatypes that would be used for metadata for our datafiles, to enable code that would allow importation of spreadsheet data into those tables. However, this is not happening yet. The only records in this table which are used are the ones with typecode = 'l' (small L), which define lookup types. These are used for the lookup types in parameter definitions for reports. There is no interface to define lookup types yet, but it is fairly simple to do it in sql. Lookup types can be defined based on a table, or a hard-coded sql, but hardcoding sql means that you can't get language-dependent strings returned as we can when referencing fields such as name[] in our reference tables. CREATE TABLE fieldtypes ( columnname character varying, schemaname character varying, tablename character varying, typename character varying UNIQUE NOT NULL, description character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.fieldtypes_id_seq'::regclass), filtercond character varying, synonyms boolean DEFAULT false, typecode character(1), sqlquery character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, domaincond character varying, del boolean NOT NULL DEFAULT false, basetypeoid oid ); |
findingsLaboratory findings CREATE TABLE findings ( createdon timestamp without time zone NOT NULL DEFAULT now(), section integer NOT NULL DEFAULT 1 REFERENCES labsections, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, hiercode character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.findings_id_seq'::regclass) ); |
form_defCREATE TABLE form_def ( row_to_json json ); |
fungsiAnimal function CREATE TABLE fungsi ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, speciesid integer REFERENCES species, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.fungsi_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
gestationReproductive parameters of key species for production module reports CREATE TABLE gestation ( id integer NOT NULL, speciesid integer NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, oestruscycle integer, variation integer NOT NULL, gestationperiod integer NOT NULL ); |
group_can_viewsCREATE TABLE group_can_views ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, view_group_id integer NOT NULL REFERENCES groups, group_id integer NOT NULL REFERENCES groups, id integer PRIMARY KEY NOT NULL DEFAULT nextval('group_can_views_id_seq'::regclass) ); |
group_permissionsDefault permissions for a user group CREATE TABLE group_permissions ( del boolean NOT NULL DEFAULT false, permission_typeid integer NOT NULL REFERENCES permission_types, groupid integer NOT NULL REFERENCES groups, permission integer NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.group_permissions_id_seq'::regclass) ); |
groupsUser roles determining default permissions in the system CREATE TABLE groups ( name character varying[] NOT NULL, admin_view boolean NOT NULL DEFAULT false, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.groups_id_seq'::regclass) ); |
hewanMaster table for individual animal identification CREATE TABLE hewan ( image character varying[], status_kematian integer REFERENCES tipeakhir, tanggal_kematian date, status status_pemilik_hewan, national_code character varying(30), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.hewan_id_seq'::regclass), identifikasi character varying, indukjantan bigint REFERENCES hewan, indukbetina bigint REFERENCES hewan, idspesies integer REFERENCES species, idsex integer REFERENCES sex, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, idfungsi integer REFERENCES fungsi, tanggallahir date, msgid bigint NOT NULL ); |
hijauanData table for forage crop production CREATE TABLE hijauan ( luas double precision NOT NULL, idjenishijauan integer NOT NULL REFERENCES jenishijauan, locationid integer NOT NULL REFERENCES locations, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.hijauan_id_seq'::regclass), tahunfasilitasi integer, idanggaran integer, bulanpanen double precision, jumlahbibit double precision, idjeniskebun integer, msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, idasalbibit integer NOT NULL ); |
importfieldsField definitions for Excel imports CREATE TABLE importfields ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importfields_id_seq'::regclass), tableid integer NOT NULL REFERENCES importtables, fieldname character varying, label character varying[] NOT NULL, required boolean NOT NULL DEFAULT true, keyfield boolean NOT NULL DEFAULT false, validationsql character varying, lookuperror character varying, lookupsql character varying, validationerror character varying, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, hidden boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, ref character varying, copyprevious boolean NOT NULL DEFAULT false, fieldtype integer NOT NULL REFERENCES fieldtypes, varname character varying ); |
importfieldtypesField types used for Excel imports CREATE TABLE importfieldtypes ( lookuperror character varying, exceltype character(1) NOT NULL DEFAULT 's'::bpchar, islist boolean NOT NULL DEFAULT false, quote boolean NOT NULL DEFAULT true, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), lookupsql character varying, validationerror character varying, validationsql character varying, description character varying, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importfieldtypes_id_seq'::regclass) ); |
importjobsJob definitions for Excel imports. May include multiple tables CREATE TABLE importjobs ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importjobs_id_seq'::regclass), name character varying[] NOT NULL, code character varying NOT NULL, permissiontypeid integer NOT NULL REFERENCES permission_types, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, sms_alert boolean NOT NULL DEFAULT false ); |
importtablesTable definitions for Excel imports CREATE TABLE importtables ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importtables_id_seq'::regclass), jobid integer NOT NULL REFERENCES importjobs, tablename character varying NOT NULL, tableorder integer NOT NULL DEFAULT 1, keyfield character varying NOT NULL DEFAULT 'id'::character varying, parenttable integer REFERENCES importtables, linkfield character varying, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, keyexpression character varying, canupdate boolean NOT NULL DEFAULT false ); |
inboxIncoming SMS messsages CREATE TABLE inbox ( message character varying, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, sender character varying, receivedtime timestamp without time zone, senttime timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.inbox_id_seq'::regclass), receiver character varying, userid integer, msgid bigint, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
infrastructureMaster table of infrastructure (labs, offices, abattoirs etc) CREATE TABLE infrastructure ( physical_condition physical_condition, existing existing, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.infrastructure_id_seq'::regclass), code character varying UNIQUE, name character varying NOT NULL, infrastructure_typeid integer NOT NULL REFERENCES infrastructure_types, locationid integer NOT NULL REFERENCES locations, address character varying, postcode character varying, phone character varying, fax character varying, contact integer, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, liveliness liveliness, del boolean NOT NULL DEFAULT false, infratype integer UNIQUE, area integer[], shortname character varying ); |
infrastructure_typesClassification of infrastructure CREATE TABLE infrastructure_types ( admin_view boolean NOT NULL DEFAULT false, code character varying UNIQUE NOT NULL, hiercode character varying UNIQUE NOT NULL, name character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.infrastructure_types_id_seq'::regclass) ); |
investigationanimalsNumber of animals sick, dead, at risk etc, in a detailed case investigation. Also used to flag the resolution of an outbreak CREATE TABLE investigationanimals ( msgid bigint NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.investigationanimals_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, resolved boolean, atrisk integer, slaughtered integer, dead integer, sick integer, speciesid integer NOT NULL REFERENCES species, caseid integer NOT NULL REFERENCES cases, userid integer NOT NULL REFERENCES users ); |
irsCREATE TABLE irs ( svdrptid integer, userid integer, name character varying, groupid integer, indivsub boolean, active boolean ); |
jenis_usahaCREATE TABLE jenis_usaha ( modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('jenis_usaha_id_seq'::regclass), name character varying(255) NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
jenisbibitTypes of forage crops CREATE TABLE jenisbibit ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jenisbibit_id_seq'::regclass), code character varying, createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
jenishijauanTypes of forage crops CREATE TABLE jenishijauan ( name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jenishijauan_id_seq'::regclass) ); |
jeniskebunTypes of garden CREATE TABLE jeniskebun ( name character varying[] NOT NULL, id integer NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, code character varying ); |
jeniskonsentratTypes of for consentrat CREATE TABLE jeniskonsentrat ( name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jeniskonsentrat_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying ); |
jeniskontainerTypes of containers CREATE TABLE jeniskontainer ( code character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jeniskontainer_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL ); |
kejadianEvents table for an individual animal, used to store a range of different event types CREATE TABLE kejadian ( reportdate timestamp without time zone NOT NULL DEFAULT now(), idhewan bigint REFERENCES hewan, idtipekejadian integer REFERENCES tipekejadian, datakejadian character varying, createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kejadian_id_seq'::regclass) ); |
kejadiankelompokEvents table for a group of animals, used to store a range of different event types CREATE TABLE kejadiankelompok ( infrastructureid integer NOT NULL REFERENCES infrastructure, msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, jumlahhewan integer NOT NULL, nilai double precision, idklasifikasi integer, idtipekejadian integer REFERENCES tipekejadian, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kejadiankelompok_id_seq'::regclass) ); |
keputusanamkeputusan pemeriksaan antemortem CREATE TABLE keputusanam ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.keputusanam_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, code character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
keputusanpmkeputusan pemeriksaan postmortem CREATE TABLE keputusanpm ( createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.keputusanpm_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), code character varying ); |
keteranganComments on a case CREATE TABLE keterangan ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.keterangan_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, keterangan character varying, msgid bigint NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
komentarComments on a case CREATE TABLE komentar ( komentar character varying, msgid bigint NOT NULL, createdby integer NOT NULL, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.komentar_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, caseid integer NOT NULL REFERENCES cases ); |
kondisikontainercondition of containers CREATE TABLE kondisikontainer ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.kondisikontainer_id_seq'::regclass), name character varying[] NOT NULL, code character varying, createdby integer NOT NULL REFERENCES users ); |
konsentratData table for consentrat CREATE TABLE konsentrat ( msgid bigint NOT NULL, idanggaran integer, modifiedon timestamp without time zone, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.konsentrat_id_seq'::regclass), infraid integer NOT NULL, idjeniskonsentrat integer NOT NULL REFERENCES jeniskonsentrat, jumlah double precision NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false ); |
kursuspelatihanTraining courses CREATE TABLE kursuspelatihan ( createdon timestamp without time zone NOT NULL DEFAULT now(), moduleid integer[], name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kursuspelatihan_id_seq'::regclass), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, trainingtype integer NOT NULL DEFAULT 1 REFERENCES trainingtypes, organiser integer NOT NULL DEFAULT 1 REFERENCES adminlevels, trainers integer[] NOT NULL, area integer[] NOT NULL, enddate date, startdate date NOT NULL DEFAULT now(), locationid integer NOT NULL ); |
labconfirmsCREATE TABLE labconfirms ( epinumber character varying, createdby integer NOT NULL DEFAULT 1, labid integer NOT NULL, caseid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('labconfirms_id_seq'::regclass), testid integer, endtesting_date timestamp without time zone, receiveresult_date timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
labsectionsLaboratory sections CREATE TABLE labsections ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.labsections_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying UNIQUE NOT NULL ); |
labsubmissionsLaboratory submissions master table CREATE TABLE labsubmissions ( submissionreason integer NOT NULL REFERENCES submissionreasons, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.submissions_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, epinum character varying NOT NULL, caseid integer REFERENCES cases, survid integer REFERENCES surveillanceprograms, skkhid integer REFERENCES movement, otherid character varying, locationid integer REFERENCES locations, submittertype integer NOT NULL REFERENCES submittertypes, submitterid integer REFERENCES users, submittername character varying, submitteraddress character varying, submitterphone landline, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint, labid integer REFERENCES infrastructure, datesampled date, datereceived date ); |
labtestsLaboratory tests defined for each laboratory, referencing testtypes (the master test table) CREATE TABLE labtests ( createdby integer NOT NULL REFERENCES users, ref character varying, accredited boolean NOT NULL DEFAULT false, quantunitsid integer REFERENCES testunits, quantfinding boolean NOT NULL DEFAULT true, qualfinding boolean NOT NULL DEFAULT false, labid integer NOT NULL REFERENCES infrastructure, sectionid integer NOT NULL REFERENCES labsections, testid integer NOT NULL REFERENCES testtypes, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.labtests_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
languagesList of languages used in the system CREATE TABLE languages ( createdon timestamp without time zone NOT NULL DEFAULT now(), code character varying UNIQUE NOT NULL, createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.languages_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
locationlevelsCREATE TABLE locationlevels ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.locationlevels_id_seq'::regclass) ); |
locationsMaster spatial data table with administrative boundaries CREATE TABLE locations ( temp boolean DEFAULT false, mendagricode character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.locations_id_seq'::regclass), name character varying, code locationcode, bpscode character varying, level integer, validfrom date DEFAULT ('now'::text)::date, validto date, geom public.geometry(MultiPolygon,4326), centroid public.geometry(Point,4326), createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, comment text, geom_proj public.geometry(MultiPolygon,3857), centroid_proj public.geometry(Point,3857) ); |
logdeleteCREATE TABLE logdelete ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.logdelete_id_seq'::regclass), table character varying(100), key character varying(50), value character varying(100), delete_by integer REFERENCES users, delete_at timestamp without time zone, scema character varying(100) ); |
Website main menu structure definition CREATE TABLE menu ( accesslevel text NOT NULL, menuaction character varying, parent integer NOT NULL, displayorder integer NOT NULL, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer, modifiedon timestamp with time zone, modifiedby integer, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.menu_id_seq'::regclass), pagetitle character varying[] NOT NULL ); |
CREATE TABLE menu2 ( modifiedon timestamp with time zone, createdby integer, createdon timestamp with time zone NOT NULL DEFAULT now(), displayorder integer NOT NULL, parent integer NOT NULL, menuaction character varying, accesslevel text NOT NULL, pagetitle character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.menu2_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedby integer ); |
methodsMethods for laboratory tests CREATE TABLE methods ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.methods_id_seq'::regclass), reportid integer, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] UNIQUE NOT NULL, hiercode character varying UNIQUE NOT NULL, code character varying UNIQUE ); |
modemlogLog of modem status CREATE TABLE modemlog ( pulsacheck timestamp without time zone, days integer, sent integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.modemlog_id_seq'::regclass), modem text, credit integer ); |
modemstatusSnapshot of modem status CREATE TABLE modemstatus ( modem text, comment character varying, incoming boolean, nport integer, days integer, credit integer, pulsacheck timestamp without time zone, ber text, ssi text, received integer, failed integer, sent integer, status text, lastcheck timestamp without time zone, phone text, operatorid integer REFERENCES sms_operators, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.modemstatus_id_seq'::regclass) ); |
modulpelatihanTraining modules CREATE TABLE modulpelatihan ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.modulpelatihan_id_seq'::regclass), del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
monthsCalendar months CREATE TABLE months ( modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), code character varying NOT NULL, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.months_id_seq'::regclass), del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL ); |
movementAnimal movement reporting (health certificate) master table CREATE TABLE movement ( createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.movement_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, origin integer NOT NULL REFERENCES locations, destination integer NOT NULL REFERENCES locations, ownerid character varying, ownerphone character varying, createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
movementanimalsList of species and number of animals for animal movement reporting CREATE TABLE movementanimals ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, total integer NOT NULL, speciesid integer NOT NULL REFERENCES species, movementid integer NOT NULL REFERENCES movement, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.movementanimals_id_seq'::regclass) ); |
multilayermapsCREATE TABLE multilayermaps ( mapreportid integer NOT NULL, listorder smallint, savedreportid integer NOT NULL REFERENCES savedreports, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer, modifiedon timestamp without time zone, modifiedby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.multilayermaps_id_seq'::regclass), reportid integer NOT NULL REFERENCES reports ); |
negativereportsVillage-level negative disease reports CREATE TABLE negativereports ( reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer NOT NULL DEFAULT nextval('data.negativereports_id_seq'::regclass), userid integer NOT NULL, msgid bigint NOT NULL, checked boolean, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
newsNews stories CREATE TABLE news ( createdby integer NOT NULL, imageid integer, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, image character varying, type character varying, summary character varying[] NOT NULL, headline character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.news_id_seq'::regclass), article character varying[] ); |
nitrogenshipmentCREATE TABLE nitrogenshipment ( modifiedon timestamp with time zone, createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, volume double precision NOT NULL, stocktakeid integer REFERENCES stocktake, receiptid integer REFERENCES receipt, shipmentid integer REFERENCES shipments, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.nitrogenshipment_id_seq'::regclass), del boolean NOT NULL DEFAULT false, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
notifiablesCREATE TABLE notifiables ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('notifiables_id_seq'::regclass), caseid integer NOT NULL, onset date, speciesid integer NOT NULL, cases integer NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL, msgid bigint NOT NULL, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone ); |
obat_zataktiftabel obat dan zat aktifnya CREATE TABLE obat_zataktif ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), idzataktif bigint NOT NULL REFERENCES zataktif, idobat bigint NOT NULL REFERENCES drugs, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.obat_zataktif_id_seq'::regclass) ); |
odttemplatesTemplates for ODT reports CREATE TABLE odttemplates ( modifiedon timestamp without time zone, name character varying, id_infrastructure integer, footer_img character varying, header_img character varying, infra_type integer, sql character varying, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, filename character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.odttemplates_id_seq'::regclass) ); |
outboxOutgoing SMS messages CREATE TABLE outbox ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, queued timestamp without time zone, modem character varying, priority boolean NOT NULL DEFAULT false, msgid bigint, message character varying, phone character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.outbox_id_seq'::regclass) ); |
ownersOwners of animals in a laboratory submission CREATE TABLE owners ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, locationid integer REFERENCES locations, phone phonenumber, address character varying, name character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.pemilik_id_seq'::regclass), del boolean NOT NULL DEFAULT false, msgid bigint, userid integer ); |
parametersMiscellaneous user defined system parameters CREATE TABLE parameters ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, value character varying, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.parameters_id_seq'::regclass) ); |
parent_speciesCREATE TABLE parent_species ( sikhnascode integer NOT NULL, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('parent_species_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
partisipanpelatihanParticipants at a training course CREATE TABLE partisipanpelatihan ( idkursuspelatihan integer NOT NULL REFERENCES kursuspelatihan, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.partisipanpelatihan_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, userid integer NOT NULL REFERENCES users ); |
password_reset_tokensCREATE TABLE password_reset_tokens ( email character varying(255) PRIMARY KEY NOT NULL, created_at timestamp without time zone, token character varying(255) ); |
pemilik_hewanLink table for animal ownership, between the hewan (animal ID) table and the users (owners) table CREATE TABLE pemilik_hewan ( tanggalakhir timestamp without time zone, lon double precision, lat double precision, geom public.geometry(Point,3857), locationid integer REFERENCES locations, idtipepemilik integer NOT NULL DEFAULT 1 REFERENCES tipepemilik, msgid bigint, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, tanggalmulai timestamp without time zone NOT NULL DEFAULT now(), idhewan bigint NOT NULL REFERENCES hewan, idpemilik bigint NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.pemilik_hewan_id_seq'::regclass) ); |
pencucian_waletpencucian walet CREATE TABLE pencucian_walet ( telp_manager character varying, manager character varying, address text, nik character varying, pemilik character varying NOT NULL, nib character varying NOT NULL, nkv_level character varying, nkv character varying, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('pencucian_walet_id_seq'::regclass), longitude double precision, latitude double precision, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, jumlah_pekerja integer, tipe_mitra_id integer NOT NULL ); |
penolakanPenolakan Pemotongan di RPH CREATE TABLE penolakan ( msgid bigint NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.penolakan_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, infrastructureid integer NOT NULL REFERENCES infrastructure, total integer NOT NULL DEFAULT 0, alasanpenolakanid integer NOT NULL, animaltypeid integer NOT NULL REFERENCES animal_types ); |
performanceCREATE TABLE performance ( records integer, createdon timestamp with time zone NOT NULL DEFAULT now(), id uuid NOT NULL DEFAULT gen_random_uuid(), datatable character varying(50), latest date, earliest date ); |
permission_typesCREATE TABLE permission_types ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.permission_types_id_seq'::regclass), description character varying[] DEFAULT '{"",""}'::character varying[], name character varying NOT NULL, defaultvalue integer DEFAULT 0, userpermission boolean NOT NULL DEFAULT false, preference boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
perubahansampelTabel Referensi Untuk Perubahan Sampel Produk Hewan CREATE TABLE perubahansampel ( id integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, modifiedby integer, createdby integer NOT NULL, code character varying, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false ); |
plr_modulesCREATE TABLE plr_modules ( modseq integer PRIMARY KEY NOT NULL, modsrc text ); |
plr_modules2CREATE TABLE plr_modules2 ( modsrc text, modseq integer ); |
populationVillage/farm level animal population CREATE TABLE population ( createdon timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, animaltypeid integer NOT NULL REFERENCES animal_types, total integer NOT NULL, locationid integer NOT NULL REFERENCES locations, createdby integer NOT NULL DEFAULT 1 REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.population_id_seq'::regclass), modifiedby integer REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
postmortemPemeriksaan postmortem di RPH CREATE TABLE postmortem ( reportdate timestamp without time zone NOT NULL DEFAULT now(), idam integer NOT NULL REFERENCES antemortem, idorgan integer NOT NULL REFERENCES specimentypes, iddiagnosa integer NOT NULL REFERENCES diseases, idsigns integer[] NOT NULL, idkeputusanpm integer NOT NULL REFERENCES keputusanpm, infrastructureid integer NOT NULL REFERENCES infrastructure, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.postmortem_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL ); |
preventivetreatmentsNon-disease associated individual animal treatments (worming, vaccination etc) CREATE TABLE preventivetreatments ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.preventivetreatments_id_seq'::regclass), drugid integer NOT NULL REFERENCES drugs, dose numeric(8,3), idhewan integer NOT NULL REFERENCES hewan, msgid bigint, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, treatment_date date ); |
productionsystemsProduction systems CREATE TABLE productionsystems ( modifiedby integer REFERENCES users, modifiedon timestamp without time zone, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.productionsystems_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, code character varying UNIQUE NOT NULL, hiercode character varying UNIQUE NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
produksi_pencucian_waletproduksi pencucian walet CREATE TABLE produksi_pencucian_walet ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('produksi_pencucian_walet_id_seq'::regclass), infra_id integer NOT NULL, kapasitas_kg double precision, produksi_kg double precision, vol_dn_kg double precision, rp_dn double precision, kuota_ln_kg double precision, kuota_dn double precision, tahun integer NOT NULL, triwulan integer NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, jumlah_gua integer, volume_gua_kg double precision ); |
produksi_rumah_waletproduksi rumah walet CREATE TABLE produksi_rumah_walet ( kapasitas_kg double precision NOT NULL, produksi_kg double precision NOT NULL, rupiah double precision, siklus_produksi integer, msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), triwulan integer NOT NULL, tahun integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('produksi_rumah_walet_id_seq'::regclass), infra_id integer NOT NULL ); |
programafkirCulling programs CREATE TABLE programafkir ( startdate date NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.programafkir_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, diseaseid integer[] NOT NULL, area integer[] NOT NULL, diseaseeventid integer REFERENCES diseaseevents, compensation boolean NOT NULL DEFAULT false, mandatory boolean NOT NULL DEFAULT false, enddate date, name character varying NOT NULL ); |
programtindakanDisease control programs CREATE TABLE programtindakan ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, diseaseid integer[] NOT NULL, area integer[] NOT NULL, enddate date, startdate date NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.programtindakan_id_seq'::regclass), name character varying NOT NULL, del boolean NOT NULL DEFAULT false ); |
provCREATE TABLE prov ( level integer, bpscode character varying, code locationcode, name character varying, id integer, del boolean, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone, centroid public.geometry(Point,4326), createdby integer, geom public.geometry(MultiPolygon,4326), validto date, validfrom date ); |
providersCREATE TABLE providers ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('providers_id_seq'::regclass), code character varying(20) NOT NULL, name character varying(255) NOT NULL, description text, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, config json ); |
purposesPurposes for vaccination CREATE TABLE purposes ( createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.purposes_id_seq'::regclass), code character varying UNIQUE NOT NULL, name character varying[] NOT NULL, type purposetypes, createdby integer NOT NULL REFERENCES users ); |
questionsQuestions sent by SMS CREATE TABLE questions ( modifiedon timestamp without time zone NOT NULL DEFAULT now(), createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), question character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.questions_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users ); |
queuestatsSnapshot of SMS outgoing queue CREATE TABLE queuestats ( createdon timestamp without time zone, outgoing integer, sent integer, main integer, createdby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.queuestats_id_seq'::regclass), checked integer, failed integer, incoming integer ); |
rabiesreportsCREATE TABLE rabiesreports ( reportdate timestamp without time zone NOT NULL DEFAULT now(), provoked boolean NOT NULL DEFAULT false, locationid integer NOT NULL REFERENCES locations, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, humansbitten integer NOT NULL, speciesid integer NOT NULL REFERENCES species, animalsbitten integer NOT NULL, caseid integer REFERENCES cases, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.rabiesreports_id_seq'::regclass) ); |
receiptCREATE TABLE receipt ( modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.receipt_id_seq'::regclass), shipmentid integer NOT NULL REFERENCES shipments, datereceived timestamp with time zone NOT NULL DEFAULT now(), infrastructureid integer NOT NULL REFERENCES infrastructure, msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now() ); |
registrationmatrixPermissions for different user types to register other users CREATE TABLE registrationmatrix ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), groupid integer NOT NULL REFERENCES groups, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.registrationmatrix_id_seq'::regclass), canregister integer NOT NULL REFERENCES groups, createdby integer NOT NULL DEFAULT 1 REFERENCES users ); |
reportcategoriesCREATE TABLE reportcategories ( prompt character varying, modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, label character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reportcategories_id_seq'::regclass) ); |
reporting_queueCREATE TABLE reporting_queue ( reportid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reporting_queue_id_seq'::regclass), queueid integer NOT NULL REFERENCES reporting_queue_users, daterange character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
reporting_queue_usersCREATE TABLE reporting_queue_users ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reporting_queue_users_id_seq'::regclass), userid integer NOT NULL REFERENCES users, is_queue boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
reportlogCREATE TABLE reportlog ( params jsonb, uid integer, rptid integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.paramslog_id_seq'::regclass), link text, svdrptid integer, del boolean NOT NULL DEFAULT false, modifiedby integer, modifiedon timestamp with time zone, createdby integer NOT NULL DEFAULT 116, createdon timestamp with time zone NOT NULL DEFAULT now() ); |
reportparamsReplaceable parameters for reports CREATE TABLE reportparams ( lookuptyp integer REFERENCES fieldtypes, reportid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.report_params_id_seq'::regclass), dfltval character varying, dynamic boolean NOT NULL DEFAULT true, mandatory boolean NOT NULL DEFAULT false, checkvalue character varying, lookupfld integer REFERENCES tablefields, lookupqry character varying, prompt character varying[] DEFAULT '{"",""}'::character varying[], paramname character varying NOT NULL, paramtype integer NOT NULL REFERENCES reportparamtypes, del boolean NOT NULL DEFAULT false, modifiedby integer DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), sortorder integer NOT NULL DEFAULT 1 ); |
reportparamtypesParameter types for reports CREATE TABLE reportparamtypes ( modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), description character varying, typename character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.rptparamtypes_id_seq'::regclass), modifiedby integer, validationregex character varying, del boolean NOT NULL DEFAULT false ); |
reportsMaster report definition table CREATE TABLE reports ( cacheable boolean DEFAULT true, web boolean NOT NULL DEFAULT true, public boolean NOT NULL DEFAULT false, permission integer DEFAULT 61 REFERENCES permission_types, footnote character varying[] DEFAULT '{"",""}'::character varying[], caption character varying[] DEFAULT '{"",""}'::character varying[], description character varying[] DEFAULT '{"",""}'::character varying[], name character varying[] NOT NULL DEFAULT '{"",""}'::character varying[], reporttype report.reporttypes, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reports_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, source_database reportdatabase NOT NULL DEFAULT 'Replica'::backoffice.reportdatabase, cache_validity integer DEFAULT 60, tag character varying, category character varying, thumbnails text, bigreportcached boolean NOT NULL DEFAULT false, max_queue_day integer, readonly boolean NOT NULL DEFAULT false, maptype report.maptype, widget_update_interval integer DEFAULT 1880, naturalorder integer, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 0 REFERENCES users, rcode character varying, sql character varying ); |
reportsTime (in minutes) between updating widget data in static storage (default one day) CREATE TABLE reports ( name character varying[] NOT NULL DEFAULT '{"",""}'::character varying[], description character varying[] DEFAULT '{"",""}'::character varying[], caption character varying[] DEFAULT '{"",""}'::character varying[], footnote character varying[] DEFAULT '{"",""}'::character varying[], permission integer DEFAULT 61 REFERENCES permission_types, public boolean NOT NULL DEFAULT false, web boolean NOT NULL DEFAULT true, modifiedby integer REFERENCES users, readonly boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), rcode character varying, maptype report.maptype, naturalorder integer, widget_update_interval integer DEFAULT 1880, cacheable boolean DEFAULT true, tag character varying, cache_validity integer DEFAULT 60, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reports_id_seq'::regclass), createdby integer NOT NULL DEFAULT 0 REFERENCES users, category character varying, sql character varying, source_database reportdatabase NOT NULL DEFAULT 'Replica'::backoffice.reportdatabase, thumbnails text, modifiedon timestamp without time zone, bigreportcached boolean NOT NULL DEFAULT false, max_queue_day integer, reporttype report.reporttypes ); |
reportsubscriptionsGroup and individual subscriptions to saved reports for automated periodic reporting CREATE TABLE reportsubscriptions ( groupid integer REFERENCES groups, active boolean NOT NULL DEFAULT true, del boolean NOT NULL DEFAULT false, modifiedby integer, modifiedon timestamp without time zone DEFAULT now(), createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), userid integer REFERENCES users, svdrptid integer NOT NULL REFERENCES savedreports, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reportsubscriptions_id_seq'::regclass) ); |
reporttagsCREATE TABLE reporttags ( prompt character varying, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL DEFAULT 1, label character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reporttags_id_seq'::regclass), modifiedby integer DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now(), createdon timestamp without time zone NOT NULL DEFAULT now() ); |
reporttagsCREATE TABLE reporttags ( modifiedby integer DEFAULT 1, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reporttags_id_seq'::regclass), label character varying[] NOT NULL, prompt character varying, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now() ); |
responseInitial investigation of a disease report, including differential diagnosis CREATE TABLE response ( del boolean NOT NULL DEFAULT false, validatedk boolean NOT NULL DEFAULT true, validatedp boolean NOT NULL DEFAULT true, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), visited boolean NOT NULL DEFAULT true, caseid integer NOT NULL REFERENCES cases, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, diagnosisid integer[] NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.response_id_seq'::regclass), otherdiagnosis character varying, modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
rest_clientCREATE TABLE rest_client ( client_code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.rest_client_id_seq'::regclass), website character varying, email character varying NOT NULL, api_key character varying, ip_address character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp(6) without time zone, modifiedby integer REFERENCES users, createdon timestamp(6) without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, expired_request integer, client_name character varying NOT NULL ); |
rest_logsLogs of rest api v1 CREATE TABLE rest_logs ( end_date date, start_date date, request_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP, ip_address character varying(30), uri character varying(255), rest_action character varying(50) NOT NULL, client_id integer NOT NULL REFERENCES rest_client, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rest_logs_id_seq'::regclass), metadata json, params json, exec_time real ); |
resultsLaboratory testing results CREATE TABLE results ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying[] NOT NULL, code character varying NOT NULL, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.results_id_seq'::regclass) ); |
riwayatvaksinasiVaccination history from priority disease investigation CREATE TABLE riwayatvaksinasi ( del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.riwayatvaksinasi_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, diseaseid integer NOT NULL REFERENCES diseases, tanggal date, msgid bigint NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
rphuCREATE TABLE rphu ( nkv character varying, idcoldstorage integer, carcasskgweight double precision, livekgweight double precision, chiller_ton double precision, blastfreezer_tonperhour double precision, operationhourperday double precision, hourcapacity double precision, operationalend_date date, statuskepemilikan integer NOT NULL, idinfra integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rphu_id_seq'::regclass), operationdayperweek double precision, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL ); |
rumah_suplier_pencucian_waletrumah_suplier_pencucian_walet CREATE TABLE rumah_suplier_pencucian_walet ( triwulan integer NOT NULL, tahun integer NOT NULL, volume_kg double precision NOT NULL, no_registrasi character varying NOT NULL, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rumah_suplier_pencucian_walet_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
rumah_waletkemitraan CREATE TABLE rumah_walet ( tipe_mitra_id integer NOT NULL, telp_manager character varying, longitude double precision, latitude double precision, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, manager character varying, address text, nik character varying, pemilik character varying NOT NULL, nib character varying NOT NULL, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rumah_walet_id_seq'::regclass) ); |
sampling_individufor individual sampling CREATE TABLE sampling_individu ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('sampling_individu_id_seq'::regclass), msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, programid integer NOT NULL REFERENCES surveillanceprograms, reportdate timestamp without time zone NOT NULL DEFAULT now(), animalid integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
savedreportparamsParameters for saved reports CREATE TABLE savedreportparams ( rptparamid integer NOT NULL REFERENCES reportparams, del boolean NOT NULL DEFAULT false, svdrptid integer NOT NULL REFERENCES savedreports, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.saved_report_params_id_seq'::regclass), modifiedon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), paramvalue character varying, modifiedby integer DEFAULT 1 ); |
savedreportsParameterised versions of reports for automated periodic reporting CREATE TABLE savedreports ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, del boolean NOT NULL DEFAULT false, public boolean NOT NULL DEFAULT false, name character varying[] DEFAULT '{"",""}'::character varying[], active boolean NOT NULL DEFAULT true, frequency report.reportfrequency, delivery report.reportdelivery, reportid integer NOT NULL REFERENCES reports, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.saved_reports_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1 ); |
selfcheckCREATE TABLE selfcheck ( modem character varying, sent timestamp without time zone, received timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.selfcheck_id_seq'::regclass) ); |
sertifikat_kompartemenCREATE TABLE sertifikat_kompartemen ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('sertifikat_kompartemen_id_seq'::regclass), farm_id integer NOT NULL REFERENCES farms, disease_id integer[] NOT NULL, certificate_number character varying(255), start_date date NOT NULL, end_date date, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
serversCREATE TABLE servers ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('servers_id_seq'::regclass), modifiedon timestamp with time zone, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now() ); |
sessionsCREATE TABLE sessions ( createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.sessions_id_seq'::regclass), sessionid character varying, userid integer ); |
sexAnimal sex CREATE TABLE sex ( code character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sex_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
shipmentsCREATE TABLE shipments ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.shipments_id_seq'::regclass), origininfraid integer NOT NULL REFERENCES infrastructure, destinfraid integer REFERENCES infrastructure, destuserid integer REFERENCES users, datesent timestamp with time zone NOT NULL DEFAULT now(), msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false ); |
signreportsDisease report for routine cases, including a list of clinical signs CREATE TABLE signreports ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.signreports_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, caseid integer NOT NULL REFERENCES cases, signsid integer[] NOT NULL, speciesid integer NOT NULL REFERENCES species, cases integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, animalid integer REFERENCES hewan ); |
signsClinical signs CREATE TABLE signs ( pelsa boolean NOT NULL DEFAULT false, synname character varying[], del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, specific boolean NOT NULL DEFAULT false, general boolean NOT NULL DEFAULT false, terminal boolean NOT NULL DEFAULT false, selectable boolean NOT NULL DEFAULT false, synonym integer, level integer, description character varying[], name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.signs_id_seq'::regclass), code character varying UNIQUE, hiercode character varying UNIQUE NOT NULL ); |
signs_asiaCREATE TABLE signs_asia ( sign character varying[] NOT NULL, hier_code character varying NOT NULL, cadre boolean DEFAULT false, level integer, selectable boolean DEFAULT false, terminal boolean DEFAULT false, general boolean DEFAULT false, specific boolean DEFAULT false, valid_from date NOT NULL DEFAULT '2010-01-01'::date, valid_to date, modified_by integer NOT NULL DEFAULT 1, modified_on timestamp without time zone NOT NULL DEFAULT now(), synonym integer NOT NULL DEFAULT 1, del boolean NOT NULL DEFAULT false, id integer NOT NULL, code character varying NOT NULL, description character varying[] ); |
signspeciesSigns valid for different species CREATE TABLE signspecies ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.signspecies_id_seq'::regclass), signid integer NOT NULL REFERENCES signs, speciesid integer NOT NULL REFERENCES species, createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
slaughtertotalsDaily abattoir slaughter totals by animal type CREATE TABLE slaughtertotals ( animaltypeid integer NOT NULL REFERENCES animal_types, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.slaughtertotals_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, total integer NOT NULL DEFAULT 0, infrastructureid integer NOT NULL REFERENCES infrastructure, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
smsMaster table for SMS message definitions CREATE TABLE sms ( keyfield character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.sms_id_seq'::regclass), name character varying[] NOT NULL, helptext character varying[], start_code character varying UNIQUE NOT NULL, error_msg character varying NOT NULL DEFAULT ::character varying, reply_sql character varying NOT NULL DEFAULT ::character varying, alert_sql character varying, protected boolean NOT NULL DEFAULT false, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, permission character varying, tablename character varying[], userid_field character varying[] NOT NULL DEFAULT '{createdby}'::character varying[], msgid_field character varying[] NOT NULL DEFAULT '{msgid}'::character varying[], reportdate_field character varying[] NOT NULL DEFAULT '{createdon}'::character varying[], readonly boolean NOT NULL DEFAULT false, public boolean DEFAULT false, version integer NOT NULL DEFAULT 1, groupid integer REFERENCES sms_groups ); |
sms_field_typesField types for SMS message definitions CREATE TABLE sms_field_types ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_field_types_id_seq'::regclass), name character varying NOT NULL, field_type character varying NOT NULL, description character varying NOT NULL, del boolean NOT NULL DEFAULT false, app_type character varying ); |
sms_fieldsField definitions for SMS messages CREATE TABLE sms_fields ( createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, targettable integer, hidden boolean NOT NULL DEFAULT false, title character varying, help character varying[], smsid integer NOT NULL REFERENCES sms, natorder integer NOT NULL, name character varying[] NOT NULL, optional boolean NOT NULL DEFAULT false, data_type integer NOT NULL, groupsequence integer NOT NULL DEFAULT 0, lu_sql character varying DEFAULT ::character varying, fieldname character varying NOT NULL DEFAULT ::character varying, error_msg character varying NOT NULL DEFAULT ::character varying, list_sql character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.sms_fields_id_seq'::regclass) ); |
sms_formatCREATE TABLE sms_format ( ?column? text ); |
sms_groupsCREATE TABLE sms_groups ( natord integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.sms_groups_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying[] NOT NULL, comment character varying[], createdby integer NOT NULL REFERENCES users ); |
sms_operatorsTelephone network operators CREATE TABLE sms_operators ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, name character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_operators_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
sms_prefixesMobile phone prefixes CREATE TABLE sms_prefixes ( createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_prefixes_id_seq'::regclass), prefix integer, operatorid integer NOT NULL REFERENCES sms_operators, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
smserrorchecksFollow-up by coordinators of users who made errors with SMS formats CREATE TABLE smserrorchecks ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.smserrorchecks_id_seq'::regclass), userid integer NOT NULL REFERENCES users, contactdate timestamp without time zone NOT NULL, action smscheckaction, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, modifiedby integer, del boolean NOT NULL DEFAULT false ); |
speciesSpecies and breeds CREATE TABLE species ( level integer NOT NULL, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.species_id_seq'::regclass), sikhnascode integer, lab boolean NOT NULL DEFAULT false, selectable boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, code character varying UNIQUE, hiercode character varying UNIQUE NOT NULL ); |
specimenformsThe form of a laboratory specimen (perservative etc) CREATE TABLE specimenforms ( hiercode character varying UNIQUE NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.specimenforms_id_seq'::regclass) ); |
specimensSpecimens from animals in a laboratory submission CREATE TABLE specimens ( msgid bigint, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, specimenformid integer NOT NULL REFERENCES specimenforms, specimentypeid integer NOT NULL REFERENCES specimentypes, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.specimens_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedby integer REFERENCES users, animalid integer NOT NULL REFERENCES animals ); |
specimentypesThe type of a laboratory specimen (tissue of origin) CREATE TABLE specimentypes ( name character varying[] NOT NULL, code character varying, hiercode character varying UNIQUE NOT NULL, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.specimentypes_id_seq'::regclass), del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
sql_featuresCREATE TABLE sql_features ( comments information_schema.character_data, sub_feature_name information_schema.character_data, is_supported information_schema.yes_or_no, is_verified_by information_schema.character_data, sub_feature_id information_schema.character_data, feature_name information_schema.character_data, feature_id information_schema.character_data ); |
sql_implementation_infoCREATE TABLE sql_implementation_info ( implementation_info_id information_schema.character_data, character_value information_schema.character_data, comments information_schema.character_data, implementation_info_name information_schema.character_data, integer_value information_schema.cardinal_number ); |
sql_languagesCREATE TABLE sql_languages ( sql_language_integrity information_schema.character_data, sql_language_implementation information_schema.character_data, sql_language_programming_language information_schema.character_data, sql_language_binding_style information_schema.character_data, sql_language_source information_schema.character_data, sql_language_year information_schema.character_data, sql_language_conformance information_schema.character_data ); |
sql_packagesCREATE TABLE sql_packages ( feature_name information_schema.character_data, feature_id information_schema.character_data, comments information_schema.character_data, is_verified_by information_schema.character_data, is_supported information_schema.yes_or_no ); |
sql_partsCREATE TABLE sql_parts ( feature_name information_schema.character_data, feature_id information_schema.character_data, comments information_schema.character_data, is_verified_by information_schema.character_data, is_supported information_schema.yes_or_no ); |
sql_sizingCREATE TABLE sql_sizing ( comments information_schema.character_data, sizing_id information_schema.cardinal_number, supported_value information_schema.cardinal_number, sizing_name information_schema.character_data ); |
sql_sizing_profilesCREATE TABLE sql_sizing_profiles ( profile_id information_schema.character_data, sizing_name information_schema.character_data, sizing_id information_schema.cardinal_number, comments information_schema.character_data, required_value information_schema.cardinal_number ); |
status_pmkList of status PMK CREATE TABLE status_pmk ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('status_pmk_id_seq'::regclass), modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, description character varying(255), question character varying(255), del boolean NOT NULL DEFAULT false, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, modifiedon timestamp without time zone, name character varying(20) NOT NULL ); |
statusasuransistatus asuransi CREATE TABLE statusasuransi ( del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, code character varying NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.statusasuransi_id_seq'::regclass) ); |
statuskepemilikanCREATE TABLE statuskepemilikan ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, name character varying NOT NULL, id integer NOT NULL ); |
statusreproReproductive statuses CREATE TABLE statusrepro ( modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, name character varying[] NOT NULL, id integer NOT NULL, del boolean NOT NULL DEFAULT false, modifiedby integer ); |
stocktakeCREATE TABLE stocktake ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.stocktake_id_seq'::regclass), stockdate timestamp with time zone NOT NULL DEFAULT now(), infrastructureid integer NOT NULL REFERENCES infrastructure, msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false ); |
stokbibitstokbibit hijauan CREATE TABLE stokbibit ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.stokbibit_id_seq'::regclass), msgid bigint NOT NULL, jenishijauanid integer NOT NULL, jenisbibitid integer NOT NULL REFERENCES jenisbibit, total double precision NOT NULL, harga integer NOT NULL, asalid integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, reportdate timestamp without time zone NOT NULL DEFAULT now() ); |
strawsStud ID CREATE TABLE straws ( createdon timestamp without time zone NOT NULL DEFAULT now(), jumlah integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, idpejantan character varying NOT NULL, idhewan bigint NOT NULL REFERENCES hewan, tanggalproduksi date NOT NULL, idpembuatan character varying NOT NULL, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, idbib integer NOT NULL REFERENCES infrastructure, del boolean NOT NULL DEFAULT false, spesies integer NOT NULL DEFAULT 22 REFERENCES species, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass) ); |
strawsList of semen straws for artificial insemination CREATE TABLE straws ( modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), tanggalproduksi date NOT NULL, idhewan bigint NOT NULL REFERENCES hewan, createdby integer NOT NULL DEFAULT 1 REFERENCES users, del boolean NOT NULL DEFAULT false, jumlah integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), idbib integer NOT NULL REFERENCES infrastructure, idpembuatan character varying NOT NULL, idpejantan character varying NOT NULL, spesies integer NOT NULL DEFAULT 22 REFERENCES species ); |
strawsDate of production CREATE TABLE straws ( idbib integer NOT NULL REFERENCES infrastructure, idpembuatan character varying NOT NULL, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), spesies integer NOT NULL DEFAULT 22 REFERENCES species, idpejantan character varying NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), tanggalproduksi date NOT NULL, jumlah integer NOT NULL, idhewan bigint NOT NULL REFERENCES hewan, modifiedby integer REFERENCES users ); |
strawsCollection Centre CREATE TABLE straws ( idpembuatan character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), idpejantan character varying NOT NULL, idbib integer NOT NULL REFERENCES infrastructure, idhewan bigint NOT NULL REFERENCES hewan, tanggalproduksi date NOT NULL, jumlah integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, spesies integer NOT NULL DEFAULT 22 REFERENCES species ); |
strawsBatch Number CREATE TABLE straws ( spesies integer NOT NULL DEFAULT 22 REFERENCES species, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, tanggalproduksi date NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), modifiedby integer REFERENCES users, idbib integer NOT NULL REFERENCES infrastructure, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, idpejantan character varying NOT NULL, jumlah integer NOT NULL, idpembuatan character varying NOT NULL, idhewan bigint NOT NULL REFERENCES hewan ); |
strawshipmentCREATE TABLE strawshipment ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.strawshipment_id_seq'::regclass), shipmentid integer REFERENCES shipments, receiptid integer REFERENCES receipt, stocktakeid integer REFERENCES stocktake, breedid integer REFERENCES species, strawid integer REFERENCES straws, total integer NOT NULL, msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false ); |
submission_reasonsCREATE TABLE submission_reasons ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.submission_reasons_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying UNIQUE NOT NULL ); |
submissionreasonsReason for laboratory submission CREATE TABLE submissionreasons ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.submissionreasons_id_seq'::regclass), code character varying NOT NULL, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), description character varying[] ); |
submissionsNotification of laboratory submissions from field cases. This is distinct from the lab.labsubmissions table (master table for laboratory submission management) CREATE TABLE submissions ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.submissions_id_seq'::regclass), reportdate timestamp without time zone, userid integer NOT NULL REFERENCES users, msgid bigint, caseid integer NOT NULL REFERENCES cases, specimentypeid integer NOT NULL REFERENCES specimentypes, specimenformid integer NOT NULL REFERENCES specimenforms, total integer NOT NULL, labid integer NOT NULL REFERENCES infrastructure, sectionid integer REFERENCES labsections, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false ); |
submittertypesClassification of laboratory submitter types CREATE TABLE submittertypes ( createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.submittertypes_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now() ); |
sumberReference list of possible sources of introduction of infection CREATE TABLE sumber ( createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sumber_id_seq'::regclass), code character varying NOT NULL, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
sumberanggaransumber anggaran CREATE TABLE sumberanggaran ( createdby integer NOT NULL, code character varying, name character varying[] NOT NULL, id integer NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
sumberpenyakitSuspected source of infection as determined during outbreak investigations CREATE TABLE sumberpenyakit ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.sumberpenyakit_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, sumberid integer NOT NULL REFERENCES sumber, locationid integer REFERENCES locations, msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
surveillanceBoth lab-based and field surveillance reports CREATE TABLE surveillance ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.surveillance_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, programid integer NOT NULL REFERENCES surveillanceprograms, locationid integer NOT NULL REFERENCES locations, speciesid integer NOT NULL REFERENCES species, specimens integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, labid integer, pos integer, neg integer ); |
surveillanceprogramsList of surveillance programs CREATE TABLE surveillanceprograms ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.surveillanceprograms_id_seq'::regclass), name character varying NOT NULL, startdate date NOT NULL DEFAULT now(), enddate date, area integer[] NOT NULL, diseaseid integer[], specimentypeid integer[] NOT NULL, labsectionid integer[] NOT NULL, purpose integer NOT NULL DEFAULT 1, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, specimenformid integer[], diseaseeventid integer REFERENCES diseaseevents ); |
survpasarTabel untuk surveilans pasar kesmavet CREATE TABLE survpasar ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.survpasar_id_seq'::regclass), idinfrastruktur integer NOT NULL REFERENCES infrastructure, idkit integer NOT NULL REFERENCES testtypes, idproduk integer NOT NULL REFERENCES species, pos integer NOT NULL DEFAULT 0, neg integer NOT NULL DEFAULT 0, idtanda integer[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint ); |
syndromereportsDisease report for priority cases including a syndrome classification CREATE TABLE syndromereports ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.syndromereports_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, syndromeid integer NOT NULL REFERENCES syndromes, speciesid integer NOT NULL REFERENCES species, cases integer NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
syndromesThe disease which the syndrome might reflect CREATE TABLE syndromes ( createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass), code character varying(6) UNIQUE NOT NULL, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, targetdiseaseid integer, description character varying[], name character varying[] NOT NULL, targetspeciesid integer[] ); |
syndromesDefined syndromes related to priority diseases CREATE TABLE syndromes ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass), code character varying(6) UNIQUE NOT NULL, name character varying[] NOT NULL, description character varying[], targetdiseaseid integer, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, targetspeciesid integer[] ); |
syndromesSyndrome name in Bahasa [1] and English [2] CREATE TABLE syndromes ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass), code character varying(6) UNIQUE NOT NULL, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), targetspeciesid integer[], del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, description character varying[], targetdiseaseid integer ); |
tablefieldsCREATE TABLE tablefields ( modifiedby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.tablefields_id_seq'::regclass), displayname character varying[] NOT NULL DEFAULT '{"",""}'::character varying[], description character varying, typeid integer NOT NULL REFERENCES fieldtypes, fldname character varying NOT NULL, tableid integer NOT NULL REFERENCES datatables, keyfld boolean NOT NULL DEFAULT false, mandatory boolean NOT NULL DEFAULT false, multiple boolean NOT NULL DEFAULT false, hidden boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone, del boolean DEFAULT false ); |
tandaklinisClinical signs observed during an outbreak investigation. Distinct from the signs reported in Signreport, as signreport signs are reproted by Pelsa, but TandaKlinis signs are reported by a vet CREATE TABLE tandaklinis ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.tandaklinis_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, signsid integer[] NOT NULL, msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
targetsTarget for laboratory tests (organism etc) CREATE TABLE targets ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.targets_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, diseaseid integer REFERENCES diseases, name character varying[] NOT NULL, hiercode character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
templatesHTML templates for reporting CREATE TABLE templates ( createdon timestamp without time zone NOT NULL DEFAULT now(), comment character varying, template character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.templates_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users ); |
templatesCREATE TABLE templates ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('templates_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, description text, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, provider_id integer NOT NULL REFERENCES providers, approved boolean NOT NULL DEFAULT false, template_format character varying(255) NOT NULL, template_id character varying(255) NOT NULL, code character varying(30) NOT NULL ); |
temptesttypesCREATE TABLE temptesttypes ( modifiedby integer, name character varying[], targetid integer, createdby integer, methodid integer, rapid boolean, del boolean, modifiedon timestamp without time zone, createdon timestamp without time zone, id integer, code character varying ); |
testresultsColumn to hold aggregated data values until processing arrangements can be agreed CREATE TABLE testresults ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), findingquant double precision, findingquant double precision, findingquant double precision, resultid integer REFERENCES results, resultid integer REFERENCES results, resultid integer REFERENCES results, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdon timestamp without time zone NOT NULL DEFAULT now(), createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedby integer REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, modifiedon timestamp without time zone, modifiedon timestamp without time zone, testid integer NOT NULL REFERENCES tests, testid integer NOT NULL REFERENCES tests, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), del boolean NOT NULL DEFAULT false, del boolean NOT NULL DEFAULT false, del boolean NOT NULL DEFAULT false, uncertaintytypeid integer REFERENCES uncertaintytypes, uncertaintytypeid integer REFERENCES uncertaintytypes, uncertaintytypeid integer REFERENCES uncertaintytypes, msgid bigint, msgid bigint, msgid bigint, jumlahpos integer, jumlahpos integer, jumlahpos integer, jumlahneg integer, jumlahneg integer, jumlahneg integer, jumlahrusak integer, jumlahrusak integer, jumlahrusak integer, findingqual integer REFERENCES findings, findingqual integer REFERENCES findings, findingqual integer REFERENCES findings, testid integer NOT NULL REFERENCES tests ); |
testresultsResults of laboratory testing CREATE TABLE testresults ( del boolean NOT NULL DEFAULT false, uncertaintytypeid integer REFERENCES uncertaintytypes, findingqual integer REFERENCES findings, jumlahneg integer, createdby integer NOT NULL DEFAULT 1 REFERENCES users, resultid integer REFERENCES results, jumlahrusak integer, findingquant double precision, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), testid integer NOT NULL REFERENCES tests, jumlahpos integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), msgid bigint ); |
testsTests performed on a specimen in a laboratory submission CREATE TABLE tests ( testtypeid integer NOT NULL REFERENCES testtypes, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.tests_id_seq'::regclass), msgid bigint, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, datetested timestamp without time zone NOT NULL, specimenid integer NOT NULL REFERENCES specimens ); |
testtypesMaster table of laboratory test types CREATE TABLE testtypes ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tests_id_seq'::regclass), modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, methodid integer NOT NULL REFERENCES methods, targetid integer NOT NULL REFERENCES targets, name character varying[] NOT NULL, code character varying UNIQUE, del boolean NOT NULL DEFAULT false, rapid boolean NOT NULL DEFAULT false ); |
testunitsQuantitative units for laboratory test findings CREATE TABLE testunits ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.testunits_id_seq'::regclass), name character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
tindakanReference table of disease control activity types CREATE TABLE tindakan ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, units character varying[] NOT NULL, name character varying[] NOT NULL, hiercode character varying NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tindakan_id_seq'::regclass) ); |
tindakanlainSpecific disease control activities undertaken under a program CREATE TABLE tindakanlain ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.tindakanlain_id_seq'::regclass), programtindakanid integer NOT NULL REFERENCES programtindakan, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, locationid integer NOT NULL REFERENCES locations, tindakanid integer NOT NULL REFERENCES tindakan, jumlah integer NOT NULL ); |
tipe_kemitraankemitraan CREATE TABLE tipe_kemitraan ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('tipe_kemitraan_id_seq'::regclass), createdby integer NOT NULL REFERENCES users ); |
tipeakhirDisposal types for animals CREATE TABLE tipeakhir ( createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('tipeakhir_id_seq'::regclass), del boolean NOT NULL DEFAULT false, live boolean DEFAULT false ); |
tipekejadianEvent types for individual animals CREATE TABLE tipekejadian ( code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tipekejadian_id_seq'::regclass), name character varying[] NOT NULL, eventdata character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, lookup_query character varying ); |
tipepemilikCREATE TABLE tipepemilik ( del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, modifiedon timestamp without time zone, code character varying NOT NULL, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.tipepemilik_id_seq'::regclass) ); |
tipepenangananTypes of procedures for non-case animals CREATE TABLE tipepenanganan ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('tipepenanganan_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, hiercode character varying, code character varying NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
trainingtypesClassification of training course types CREATE TABLE trainingtypes ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.trainingtypes_id_seq'::regclass) ); |
translationMultilingual translation table for strings displayed in SMS, reports and other outputs CREATE TABLE translation ( class integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.translation_id_seq'::regclass), code character varying NOT NULL, name character varying[] NOT NULL, comment character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, type boolean NOT NULL DEFAULT false, templateid integer REFERENCES templates ); |
translationclassesCREATE TABLE translationclasses ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.translationclasses_id_seq'::regclass), name character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
treatmentanimalsAnimals treated associated with a case CREATE TABLE treatmentanimals ( userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.treatmentanimals_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), msgid bigint NOT NULL, treatmentid integer NOT NULL REFERENCES treatments, drugid integer NOT NULL REFERENCES drugs, dose numeric(8,3), animals integer NOT NULL DEFAULT 1, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, animalid integer[] ); |
treatmentsMaster table of treatments associated with a case CREATE TABLE treatments ( reportdate timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, msgid bigint NOT NULL, caseid integer NOT NULL REFERENCES cases, createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.treatments_id_seq'::regclass), userid integer NOT NULL REFERENCES users ); |
ujicepatField rapid test results CREATE TABLE ujicepat ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, neg integer NOT NULL, pos integer NOT NULL, speciesid integer NOT NULL REFERENCES species, testtypeid integer NOT NULL REFERENCES testtypes, caseid integer NOT NULL REFERENCES cases, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.ujicepat_id_seq'::regclass), msgid bigint NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone ); |
uncertaintytypesUncertainty around a quantitative laboratory test finding (>, <, ~ etc) CREATE TABLE uncertaintytypes ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.uncertaintytypes_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
urlinsertfieldsMetadata for system to allow data to be inserted into a table directly from a URL query string, which may be submitted from outside the website (eg. clicked from an email). This table defines the parameters to be submitted. CREATE TABLE urlinsertfields ( del boolean NOT NULL DEFAULT false, paramtype character varying NOT NULL, paramname character varying NOT NULL, urlinsertjobid integer NOT NULL REFERENCES urlinsertjobs, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.urlinsertfields_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, modifiedby integer ); |
urlinsertjobsMetadata for system to allow data to be inserted into a table directly from a URL query string, which may be submitted from outside the website (eg. clicked from an email). This table defines the messages. CREATE TABLE urlinsertjobs ( createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, modifiedby integer, name character varying NOT NULL, insertsql character varying NOT NULL, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.urlinsertjobs_id_seq'::regclass), replysql character varying NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
user_hierarchyCREATE TABLE user_hierarchy ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.user_hierarchy_id_seq'::regclass), superiorid integer REFERENCES users, inferiorid integer REFERENCES users, relation relationshiptype, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
user_infrastructuresCREATE TABLE user_infrastructures ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, createdby integer NOT NULL, user_id integer UNIQUE NOT NULL, user_id integer NOT NULL REFERENCES users, infra_id integer UNIQUE NOT NULL, infra_id integer NOT NULL REFERENCES infrastructure, id integer PRIMARY KEY NOT NULL DEFAULT nextval('user_infrastructures_id_seq'::regclass) ); |
user_kompartemenCREATE TABLE user_kompartemen ( user_id integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, farm_id integer NOT NULL REFERENCES farms, id integer PRIMARY KEY NOT NULL DEFAULT nextval('user_kompartemen_id_seq'::regclass) ); |
user_permissionsPermissions set at the individual user level (overrides group permissions) CREATE TABLE user_permissions ( del boolean NOT NULL DEFAULT false, userid integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.user_permissions_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, permission integer NOT NULL, permission_typeid integer NOT NULL REFERENCES permission_types ); |
userreportslogCREATE TABLE userreportslog ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 0 REFERENCES users, svdrptid integer[] NOT NULL, userid integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.userreportslog_id_seq'::regclass) ); |
usersMaster users table CREATE TABLE users ( restclient_id integer REFERENCES rest_client, national_code character varying(255), address text, email_confirm_uuid uuid DEFAULT gen_random_uuid(), email_confirmed timestamp with time zone, nik character varying(16), centroid_proj public.geometry(Point,3857), deleted_email character varying, msgid bigint, time_expired integer DEFAULT 0, picture character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, groupid integer[] NOT NULL, infraid integer, area integer[], locationid integer, pin text DEFAULT backoffice.create_pin(), password character varying, userlanguage integer NOT NULL DEFAULT 1, email character varying, phone phonenumber, surname character varying, firstname character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.users_id_seq'::regclass) ); |
users_babinsaList BABINSA/BABINKAMTIBNAS of INDONESIA CREATE TABLE users_babinsa ( nrp character varying(20), name character varying(255) NOT NULL, phone character varying(15), modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('users_babinsa_id_seq'::regclass), jabatan character varying(255), address text, status character(10), structure_name character varying(255), pangkat character varying(30) ); |
users_otpList OTP code by public register user CREATE TABLE users_otp ( createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, del boolean NOT NULL DEFAULT false, verified boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('users_otp_id_seq'::regclass), code character varying(4) NOT NULL, user_id integer NOT NULL REFERENCES users, expired_at integer DEFAULT 0, attempt_tries integer DEFAULT 0, token text, modifiedon timestamp without time zone ); |
users_testCREATE TABLE users_test ( createdby integer, phone phonenumber, surname character varying, firstname character varying, id integer, locationid integer, pin text, password character varying, userlanguage integer, area integer[], infraid integer, groupid integer[], createdon timestamp without time zone, msgid bigint, time_expired integer, picture character varying, del boolean, modifiedby integer, modifiedon timestamp without time zone, email character varying ); |
vaccination_individuCREATE TABLE vaccination_individu ( programid integer NOT NULL REFERENCES vaccinationprograms, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, idhewan bigint NOT NULL, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.vaccination_individu_id_seq'::regclass) ); |
vaccination_targetsCREATE TABLE vaccination_targets ( total_target integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('vaccination_targets_id_seq'::regclass), location_id integer NOT NULL REFERENCES locations, disease_id integer NOT NULL REFERENCES diseases ); |
vaccinationprogramsVaccination programs CREATE TABLE vaccinationprograms ( startdate date NOT NULL DEFAULT now(), purpose integer NOT NULL DEFAULT 1, vaccineid integer[] NOT NULL, area integer[] NOT NULL, enddate date, diseaseid integer[] NOT NULL, dosespusat integer NOT NULL DEFAULT 0, dosesprovinsi integer NOT NULL DEFAULT 0, doseskabupaten integer NOT NULL DEFAULT 0, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, diseaseeventid integer REFERENCES diseaseevents, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.vaccinationprograms_id_seq'::regclass) ); |
vaccinationsVillage/farm level vaccination events associated with a vaccination program CREATE TABLE vaccinations ( locationid integer NOT NULL REFERENCES locations, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, booster integer, firstdose integer NOT NULL DEFAULT 0, speciesid integer NOT NULL REFERENCES species, programid integer NOT NULL REFERENCES vaccinationprograms, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.vaccinations_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now() ); |
vachistoryVaccination history of an animal in a laboratory submission CREATE TABLE vachistory ( vacdate date, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, vaccineid integer REFERENCES drugs, diseaseid integer REFERENCES diseases, animalid integer REFERENCES animals, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.vachistory_id_seq'::regclass) ); |
valdataCREATE TABLE valdata ( fsql character varying, ferr character varying, terr character varying, tsql character varying ); |
warnaAnimal colour CREATE TABLE warna ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.warna_id_seq'::regclass) ); |
weekdaysDays of the week CREATE TABLE weekdays ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.weekdays_id_seq'::regclass), name character varying[] NOT NULL, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying NOT NULL, modifiedon timestamp without time zone ); |
yii2sessionCREATE TABLE yii2session ( data text, id character varying NOT NULL, expire integer ); |
yiisessionSession management for web system CREATE TABLE yiisession ( id character varying PRIMARY KEY NOT NULL, expire integer, recordid integer UNIQUE NOT NULL DEFAULT nextval('backoffice.yiisession_recordid_seq'::regclass), data text, userid integer ); |
zataktifComposition of drugs by regulation status CREATE TABLE zataktif ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.zataktif_id_seq'::regclass), name character varying[] NOT NULL, code character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
zoonosesData on human involvement in suspected zoonotic disease cases CREATE TABLE zoonoses ( terpapar integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.zoonoses_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, sakit integer NOT NULL, msgid bigint NOT NULL, mati integer NOT NULL, caseid integer NOT NULL REFERENCES cases ); |