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(), createdby integer NOT NULL REFERENCES users, 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 ); |
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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.ages_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
ageunitsUnits for age measurement CREATE TABLE ageunits ( name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.ageunits_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, days integer, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying NOT NULL ); |
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 ( productionsystemid integer NOT NULL REFERENCES productionsystems, modifiedby integer REFERENCES users, backyard boolean NOT NULL DEFAULT true, createdon timestamp without time zone NOT NULL DEFAULT now(), caseid integer NOT NULL REFERENCES cases, 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(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.aireports_id_seq'::regclass) ); |
alasanpenolakanalasan penolakan pemotongan CREATE TABLE alasanpenolakan ( id integer PRIMARY KEY NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, code character varying, createdby integer NOT NULL ); |
animal_typesAnimal type classification for slaughter and population CREATE TABLE animal_types ( code character varying UNIQUE 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, slaughter boolean NOT NULL DEFAULT false, population boolean NOT NULL DEFAULT true, age integer REFERENCES ages, productive boolean, origin at_origin, purpose at_purpose, sex at_sex, species integer REFERENCES species, name character varying[] NOT NULL, hiercode character varying UNIQUE, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.animal_types_id_seq'::regclass) ); |
animalidCREATE TABLE animalid ( id integer ); |
animalsList of animal that registered by Satgas PMK CREATE TABLE animals ( createdby integer NOT NULL REFERENCES users, 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, visitor_id integer NOT NULL REFERENCES farm_visits, signs integer[], del boolean NOT NULL DEFAULT false, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
animalsAnimals in a laboratory submission. On submission may include several animals from several different owners CREATE TABLE animals ( speciesid integer NOT NULL REFERENCES species, msgid bigint, ageunitsid integer REFERENCES ageunits, 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, age double precision, sexid integer REFERENCES sex, 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) ); |
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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('apifields_id_seq'::regclass), apiid integer NOT NULL REFERENCES apis, name character varying NOT NULL, 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 ); |
apioperationsCREATE TABLE apioperations ( modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apioperations_id_seq'::regclass), name character varying NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone ); |
apiparamtypesCREATE TABLE apiparamtypes ( regex character varying NOT NULL, name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('apiparamtypes_id_seq'::regclass), modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users ); |
apisCREATE TABLE apis ( name character varying NOT NULL, description character varying NOT NULL, operationid integer NOT NULL REFERENCES apioperations, permissionid integer NOT NULL REFERENCES permission_types, 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('apis_id_seq'::regclass) ); |
apisqlCREATE TABLE apisql ( createdby integer NOT NULL REFERENCES users, 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), del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, 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, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), outcome character varying, reportid integer NOT NULL, userid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_downloads_id_seq'::regclass) ); |
app_projectsThis table holds project definitions for delivery by the app.php action CREATE TABLE app_projects ( del boolean NOT NULL DEFAULT false, 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 ); |
app_reportsThis table holds reports for delivery by the app.php action CREATE TABLE app_reports ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_reports_id_seq'::regclass), createdby integer NOT NULL DEFAULT 1, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), description character varying[] NOT NULL, modifiedon timestamp without time zone, reportdefinition json, modifiedby integer ); |
app_reportsThis field holds the full json string for the app download. CREATE TABLE app_reports ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_reports_id_seq'::regclass), name character varying[] NOT NULL, description character varying[] NOT NULL, reportdefinition json, createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone ); |
app_staticThis table holds static data for delivery by the app.php action CREATE TABLE app_static ( name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.app_static_id_seq'::regclass), description character varying[] NOT NULL, 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, sql character varying, version integer NOT NULL DEFAULT 1 ); |
apphelpCREATE TABLE apphelp ( help character varying[], pageref character varying, modifiedon timestamp with time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.apphelp_id_seq'::regclass), modifiedby integer REFERENCES users, pageid integer NOT NULL, appid integer NOT NULL DEFAULT 1, createdon timestamp with time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users ); |
asalbibitOrigin of seed for forage crops CREATE TABLE asalbibit ( code character varying, modifiedby integer, name character varying[] NOT NULL, modifiedon timestamp without time zone, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer NOT NULL, 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 ( bizrule text, data text, name character varying(64) PRIMARY KEY NOT NULL, description text, type integer NOT NULL ); |
auth_item_childCREATE TABLE auth_item_child ( child character varying(64) NOT NULL, parent character varying(64) NOT NULL ); |
batchCREATE TABLE batch ( populasi_awal integer NOT NULL, 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, populasi_akhir integer, tanggalakhir date, 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, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.bcs_id_seq'::regclass), nilai character varying NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
bmindotempprovCREATE TABLE bmindotempprov ( createdby integer, centroid_proj public.geometry(Point,3857), code locationcode, temp boolean, geom_proj public.geometry(MultiPolygon,3857), comment text, del boolean, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone, level integer, bpscode character varying, validfrom date, id integer, validto date, name character varying, geom public.geometry(MultiPolygon,4326), centroid public.geometry(Point,4326) ); |
brewerpalettesColour definitions for charts CREATE TABLE brewerpalettes ( 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.brewerpalettes_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
brosurCREATE TABLE brosur ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('brosur_id_seq'::regclass), title character varying(255) NOT NULL, cover_image character varying(255), document character varying(255), description text, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false ); |
businessrulesBusiness rules definining custom actions to be taken during data processing CREATE TABLE businessrules ( sql character varying, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp without time zone, ruleorder integer, caller character varying, hook hook, description character varying, name character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.businessrules_id_seq1'::regclass), del boolean NOT NULL DEFAULT false, rulefunction character varying ); |
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) ); |
cadrereportsA dummy table for testing of the spreadsheet parsing CREATE TABLE cadrereports ( msgid character varying NOT NULL, reportdate date NOT NULL, createdby integer NOT NULL, signids integer[], syndrome integer REFERENCES syndromes, location integer NOT NULL REFERENCES locations, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cadrereports_id_seq'::regclass), createdon timestamp with time zone NOT NULL DEFAULT now(), numcases integer NOT NULL, speciesid integer NOT NULL REFERENCES species, modifiedby integer, modifiedon timestamp with time zone NOT NULL DEFAULT now() ); |
cadreresponsesA dummy table for testing of the spreadsheet parsing CREATE TABLE cadreresponses ( responsedate date NOT NULL, otherdiagnosis character varying, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL, modifiedon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cadreresponses_id_seq'::regclass), caseid parentlink NOT NULL REFERENCES cadrereports, msgid character varying NOT NULL, diagnosis integer[] NOT NULL ); |
case_animalsIndividual animals in a disease case CREATE TABLE case_animals ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.case_animals_id_seq'::regclass), idcase integer NOT NULL REFERENCES cases, createdby integer NOT NULL REFERENCES users, msgid bigint, idhewan integer NOT NULL REFERENCES hewan, del boolean DEFAULT false ); |
caseimagesImages from a disease case CREATE TABLE caseimages ( modifiedby integer REFERENCES users, caseid integer REFERENCES cases, msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.caseimages_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, image character varying NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
caseresultsOutcome of a case (resolved, died, still sick) CREATE TABLE caseresults ( 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.caseresults_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, jumlah integer, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, result integer NOT NULL REFERENCES caseresulttypes, caseid integer NOT NULL REFERENCES cases ); |
caseresulttypesOutcomes of clinical cases CREATE TABLE caseresulttypes ( modifiedby integer REFERENCES users, code character varying, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.caseresulttypes_id_seq'::regclass), name character varying[] NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone ); |
casesMaster table for all field disease cases CREATE TABLE cases ( createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.cases_id_seq'::regclass), del boolean NOT NULL DEFAULT false, validationby integer REFERENCES users, validationon timestamp without time zone, validation boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1 REFERENCES users, userid integer NOT NULL REFERENCES users, locationid integer NOT NULL REFERENCES locations, msgid bigint NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now() ); |
coldstorageCREATE TABLE coldstorage ( 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, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('coldstorage_id_seq'::regclass), idinfra integer NOT NULL ); |
coldstorage_stockCREATE TABLE coldstorage_stock ( stockin double precision NOT NULL, msgid bigint 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, endstock double precision NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('coldstorage_stock_id_seq'::regclass), idcs integer NOT NULL, producttypes integer, stockout double precision NOT NULL ); |
compartement_negativereportsCREATE TABLE compartement_negativereports ( reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid integer NOT NULL, checked boolean, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('compartement_negativereports_id_seq'::regclass) ); |
compartment_disease_casesCREATE TABLE compartment_disease_cases ( 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, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, 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, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now() ); |
containershipmentCREATE TABLE containershipment ( del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, 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 ( sql text, createdon timestamp with time zone, modifiedon 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), jsonobj json, typereport text, modifiedby integer ); |
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, createdby integer NOT NULL DEFAULT 1 REFERENCES users, del boolean NOT NULL DEFAULT false, 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() ); |
datatablesCREATE TABLE datatables ( displayname character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), parenttbl integer REFERENCES datatables, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL DEFAULT 1, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.datatables_id_seq'::regclass), modifiedby integer, modifiedon timestamp without time zone, tblname character varying UNIQUE NOT NULL ); |
daterangetypesPre-defined date ranges for reporting CREATE TABLE daterangetypes ( createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), sql text, 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, name character varying[] UNIQUE NOT NULL DEFAULT '{"",""}'::character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.daterangetypes_id_seq'::regclass) ); |
deleted_vaccination_logsLogs of deleted vaccination individu CREATE TABLE deleted_vaccination_logs ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('deleted_vaccination_logs_id_seq'::regclass), deletedat timestamp without time zone DEFAULT CURRENT_TIMESTAMP, 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, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL DEFAULT 1 REFERENCES users, tanduk character varying, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.deskripsihewan_id_seq'::regclass), idhewan bigint REFERENCES hewan, 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, userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('device_token_users_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() ); |
diagnosesDefinitive diagnosis for cases. May be submitted as part of lab submission or by field SMS. CREATE TABLE diagnoses ( del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL, 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, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
disease_detailsCREATE TABLE disease_details ( 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, other_names character varying[], description character varying[], diagnosis character varying[], treatment character varying[], prevention character varying[], species integer[], createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.disease_details_id_seq'::regclass), diseaseid integer REFERENCES diseases ); |
disease_parent_speciesCREATE TABLE disease_parent_species ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('disease_parent_species_id_seq'::regclass), disease_id integer NOT NULL REFERENCES diseases, parent_species_id integer NOT NULL REFERENCES parent_species, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false ); |
disease_statusCREATE TABLE disease_status ( is_special_condition boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('disease_status_id_seq'::regclass), disease_id integer NOT NULL, location_id integer NOT NULL REFERENCES locations, disease_isikhnas_id integer NOT NULL REFERENCES diseases, status character varying(10) NOT NULL ); |
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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.diseases_id_seq'::regclass), synname character varying[], contagious boolean NOT NULL DEFAULT false, oie boolean NOT NULL DEFAULT false, main boolean NOT NULL DEFAULT false, strategic boolean NOT NULL DEFAULT false, priority boolean NOT NULL DEFAULT false, synonym integer, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, code character varying UNIQUE NOT NULL, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, prevalence real, exotic boolean NOT NULL DEFAULT false, zoonotic boolean NOT NULL DEFAULT false ); |
diseasesignsProbabiilty matrix of the occurrence of different signs with different diseases CREATE TABLE diseasesigns ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.diseasesigns_id_seq'::regclass), diseaseid integer NOT NULL REFERENCES diseases, signid integer NOT NULL REFERENCES signs, prob real NOT NULL DEFAULT 0.5, 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 ); |
diseasespeciesSpecies susceptible to different diseases CREATE TABLE diseasespecies ( 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.diseasespecies_id_seq'::regclass), diseaseid integer NOT NULL REFERENCES diseases, speciesid integer NOT NULL REFERENCES species, createdby integer NOT NULL REFERENCES users ); |
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 ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.drugclasses_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
drugsMaster table of registered and other drugs CREATE TABLE drugs ( packaging character varying, 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, doseunits units, 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 ); |
drugtypesClassification of drugs by functional group CREATE TABLE drugtypes ( del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), synonym integer, name character varying[] NOT NULL, hiercode character varying UNIQUE NOT NULL, code character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.drugtypes_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
ekspor_pencucian_waletekspor_pencucian_walet CREATE TABLE ekspor_pencucian_walet ( createdby integer NOT NULL REFERENCES users, triwulan integer NOT NULL, tahun integer NOT NULL, rupiah double precision, volume_kg double precision, negara_tujuan character varying NOT NULL, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('ekspor_pencucian_walet_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() ); |
emailnotificationsCREATE TABLE emailnotifications ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('backoffice.emailnotifications_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 0, type character varying, recipient character varying, unsubscribeurl character varying, signingcerturl character varying, signature character varying, signatureversion character varying, notificationtime timestamp with time zone, message jsonb, topicarn character varying, messageid character varying ); |
errorsLog of SMS format errors CREATE TABLE errors ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, message character varying, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.errors_id_seq'::regclass), userid integer NOT NULL REFERENCES users, receivedtime timestamp without time zone ); |
estrusCREATE TABLE estrus ( modifiedon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.estrus_id_seq'::regclass), msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), animals integer NOT NULL DEFAULT 1, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedby integer REFERENCES users ); |
eventcaseLink table to associate multiple cases with a single major disease event CREATE TABLE eventcase ( modifiedby integer REFERENCES users, 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(), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
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 ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.exportreferences_id_seq'::regclass), name character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, replysql character varying, listname character varying[], listsql character varying, filename character varying ); |
exportreferencetabsTab (worksheet) content definition for the reference table export system CREATE TABLE exportreferencetabs ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.exportreferencetabs_id_seq'::regclass), modifiedon timestamp without time zone, modifiedby integer REFERENCES users, exportreferenceid integer NOT NULL REFERENCES exportreferences, tabname character varying NOT NULL, sql character varying NOT NULL, del boolean NOT NULL DEFAULT false, sortorder integer NOT NULL DEFAULT 1, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
farm_hewanCREATE TABLE farm_hewan ( idfarm integer NOT NULL REFERENCES farms, 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, del boolean NOT NULL DEFAULT false ); |
farm_visitsVisited list identification by Satgas PMK CREATE TABLE farm_visits ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, visited_by integer NOT NULL REFERENCES users, visited_date timestamp without time zone DEFAULT CURRENT_TIMESTAMP, farmer_id integer NOT NULL REFERENCES farmers, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farm_visits_id_seq'::regclass), modifiedby integer REFERENCES users ); |
farmersList of farmers that registered by Satgas PMK CREATE TABLE farmers ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('farmers_id_seq'::regclass), name character varying(255) NOT NULL, phone phonenumber NOT NULL, nik character varying(16) NOT NULL, location_id integer NOT NULL REFERENCES locations, address character varying(255), status_id integer NOT NULL REFERENCES status_pmk, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, centroid public.geometry(Point,4326) ); |
farmsCREATE TABLE farms ( del boolean NOT NULL DEFAULT false, code character varying(255), id integer PRIMARY KEY NOT NULL DEFAULT nextval('farms_id_seq'::regclass), national_code character varying(255) NOT NULL, idspecies integer NOT NULL REFERENCES species, name character varying 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 ); |
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, tablename character varying, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), synonyms boolean DEFAULT false, filtercond character varying, sqlquery character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.fieldtypes_id_seq'::regclass), schemaname character varying, typename character varying UNIQUE NOT NULL, description character varying, typecode character(1), domaincond character varying, basetypeoid oid ); |
findingsLaboratory findings CREATE TABLE findings ( 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), section integer NOT NULL DEFAULT 1 REFERENCES labsections, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
form_defCREATE TABLE form_def ( row_to_json json ); |
fungsiAnimal function CREATE TABLE fungsi ( name character varying[] NOT NULL, speciesid integer REFERENCES species, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.fungsi_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, code character varying NOT NULL, createdby integer NOT NULL REFERENCES users ); |
gestationReproductive parameters of key species for production module reports CREATE TABLE gestation ( del boolean NOT NULL DEFAULT false, speciesid integer NOT NULL, id integer NOT NULL, gestationperiod integer NOT NULL, variation integer NOT NULL, oestruscycle integer, createdby integer NOT NULL, createdon timestamp with time zone NOT NULL DEFAULT now(), modifiedby integer, modifiedon timestamp with time zone ); |
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 ( status status_pemilik_hewan, status_kematian integer REFERENCES tipeakhir, tanggal_kematian date, 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, image character varying[], national_code character varying(30) ); |
hijauanData table for forage crop production CREATE TABLE hijauan ( createdby integer NOT NULL REFERENCES users, idasalbibit integer NOT NULL, luas double precision NOT NULL, idjenishijauan integer NOT NULL REFERENCES jenishijauan, locationid integer NOT NULL REFERENCES locations, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.hijauan_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), 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() ); |
importfieldsField definitions for Excel imports CREATE TABLE importfields ( lookupsql character varying, createdby integer NOT NULL DEFAULT 1 REFERENCES users, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, ref character varying, copyprevious boolean NOT NULL DEFAULT false, varname character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importfields_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), validationerror character varying, validationsql character varying, 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, hidden boolean NOT NULL DEFAULT false, fieldtype integer NOT NULL REFERENCES fieldtypes, lookuperror character varying ); |
importfieldtypesField types used for Excel imports CREATE TABLE importfieldtypes ( description character varying, name character varying[] NOT NULL, exceltype character(1) NOT NULL DEFAULT 's'::bpchar, lookupsql character varying, lookuperror 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, islist boolean NOT NULL DEFAULT false, validationerror character varying, validationsql character varying, quote boolean NOT NULL DEFAULT true, del boolean NOT NULL DEFAULT false, 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 ( modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importjobs_id_seq'::regclass), del boolean NOT NULL DEFAULT false, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), sms_alert boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, code character varying NOT NULL, permissiontypeid integer NOT NULL REFERENCES permission_types, name character varying[] NOT NULL ); |
importtablesTable definitions for Excel imports CREATE TABLE importtables ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.importtables_id_seq'::regclass), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, keyexpression character varying, canupdate boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), linkfield character varying, parenttable integer REFERENCES importtables, keyfield character varying NOT NULL DEFAULT 'id'::character varying, tableorder integer NOT NULL DEFAULT 1, tablename character varying NOT NULL, jobid integer NOT NULL REFERENCES importjobs ); |
inboxIncoming SMS messsages CREATE TABLE inbox ( senttime timestamp without time zone, receivedtime timestamp without time zone, sender character varying, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, message character varying, msgid bigint, userid integer, receiver character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.inbox_id_seq'::regclass), del boolean NOT NULL DEFAULT false ); |
infrastructureMaster table of infrastructure (labs, offices, abattoirs etc) CREATE TABLE infrastructure ( name character varying NOT NULL, code character varying UNIQUE, liveliness liveliness, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.infrastructure_id_seq'::regclass), physical_condition physical_condition, existing existing, shortname character varying, area integer[], infratype integer UNIQUE, 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, contact integer, fax character varying, phone character varying, postcode character varying, address character varying, locationid integer NOT NULL REFERENCES locations, infrastructure_typeid integer NOT NULL REFERENCES infrastructure_types ); |
infrastructure_typesClassification of infrastructure CREATE TABLE infrastructure_types ( createdby integer NOT NULL REFERENCES users, admin_view boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.infrastructure_types_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, code character varying UNIQUE NOT NULL, hiercode character varying UNIQUE NOT NULL, name character varying[] NOT NULL ); |
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 ( speciesid integer NOT NULL REFERENCES species, 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.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, caseid integer NOT NULL REFERENCES cases ); |
irsCREATE TABLE irs ( svdrptid integer, userid integer, name character varying, groupid integer, indivsub boolean, active boolean ); |
jenisbibitTypes of forage crops CREATE TABLE jenisbibit ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jenisbibit_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, code character varying ); |
jenishijauanTypes of forage crops CREATE TABLE jenishijauan ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jenishijauan_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, del boolean NOT NULL DEFAULT false ); |
jeniskebunTypes of garden CREATE TABLE jeniskebun ( 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, id integer NOT NULL, name character varying[] NOT NULL, code character varying ); |
jeniskonsentratTypes of for consentrat CREATE TABLE jeniskonsentrat ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), 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.jeniskonsentrat_id_seq'::regclass), name character varying[] NOT NULL, code character varying ); |
jeniskontainerTypes of containers CREATE TABLE jeniskontainer ( createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, code character varying, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.jeniskontainer_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now() ); |
kejadianEvents table for an individual animal, used to store a range of different event types CREATE TABLE kejadian ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kejadian_id_seq'::regclass), datakejadian character varying, reportdate timestamp without time zone NOT NULL DEFAULT now(), idhewan bigint REFERENCES hewan, idtipekejadian integer REFERENCES tipekejadian, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
kejadiankelompokEvents table for a group of animals, used to store a range of different event types CREATE TABLE kejadiankelompok ( modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kejadiankelompok_id_seq'::regclass), infrastructureid integer NOT NULL REFERENCES infrastructure, reportdate timestamp without time zone NOT NULL DEFAULT now(), idtipekejadian integer REFERENCES tipekejadian, idklasifikasi integer, nilai double precision, jumlahhewan integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), msgid bigint NOT NULL, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
keputusanamkeputusan pemeriksaan antemortem CREATE TABLE keputusanam ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.keputusanam_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, name character varying[] NOT NULL, code character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
keputusanpmkeputusan pemeriksaan postmortem CREATE TABLE keputusanpm ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.keputusanpm_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, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
keteranganComments on a case CREATE TABLE keterangan ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, keterangan character varying, caseid integer NOT NULL REFERENCES cases, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.keterangan_id_seq'::regclass) ); |
komentarComments on a case CREATE TABLE komentar ( modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.komentar_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, komentar character varying, msgid bigint NOT NULL, createdby integer NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer, del boolean NOT NULL DEFAULT false ); |
kondisikontainercondition of containers CREATE TABLE kondisikontainer ( 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.kondisikontainer_id_seq'::regclass) ); |
konsentratData table for consentrat CREATE TABLE konsentrat ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, jumlah double precision NOT NULL, del boolean NOT NULL DEFAULT false, reportdate timestamp without time zone NOT NULL DEFAULT now(), idanggaran integer, msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.konsentrat_id_seq'::regclass), infraid integer NOT NULL, idjeniskonsentrat integer NOT NULL REFERENCES jeniskonsentrat, modifiedon timestamp without time zone ); |
kursuspelatihanTraining courses CREATE TABLE kursuspelatihan ( 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, trainers integer[] NOT NULL, organiser integer NOT NULL DEFAULT 1 REFERENCES adminlevels, trainingtype integer NOT NULL DEFAULT 1 REFERENCES trainingtypes, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.kursuspelatihan_id_seq'::regclass), name character varying[] NOT NULL, moduleid integer[], locationid integer NOT NULL, startdate date NOT NULL DEFAULT now(), enddate date, area integer[] NOT NULL, modifiedon timestamp without time zone ); |
labconfirmsCREATE TABLE labconfirms ( testid integer, endtesting_date timestamp without time zone, receiveresult_date timestamp without time zone, createdby integer NOT NULL DEFAULT 1, epinumber character varying, labid integer NOT NULL, caseid 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('labconfirms_id_seq'::regclass) ); |
labsectionsLaboratory sections CREATE TABLE labsections ( 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.labsections_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
labsubmissionsLaboratory submissions master table CREATE TABLE labsubmissions ( userid integer NOT NULL REFERENCES users, datereceived date, datesampled date, labid integer REFERENCES infrastructure, 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, submitterphone landline, submitteraddress character varying, submittername character varying, submitterid integer REFERENCES users, submittertype integer NOT NULL REFERENCES submittertypes, locationid integer REFERENCES locations, otherid character varying, skkhid integer REFERENCES movement, survid integer REFERENCES surveillanceprograms, caseid integer REFERENCES cases, submissionreason integer NOT NULL REFERENCES submissionreasons, epinum character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.submissions_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now() ); |
labtestsLaboratory tests defined for each laboratory, referencing testtypes (the master test table) CREATE TABLE labtests ( ref character varying, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.labtests_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, testid integer NOT NULL REFERENCES testtypes, sectionid integer NOT NULL REFERENCES labsections, qualfinding boolean NOT NULL DEFAULT false, labid integer NOT NULL REFERENCES infrastructure, quantfinding boolean NOT NULL DEFAULT true, quantunitsid integer REFERENCES testunits, accredited boolean NOT NULL DEFAULT false ); |
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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.locationlevels_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 NOT NULL ); |
locationsMaster spatial data table with administrative boundaries CREATE TABLE locations ( mendagricode character varying, temp boolean DEFAULT false, centroid_proj public.geometry(Point,3857), geom_proj public.geometry(MultiPolygon,3857), comment text, 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, centroid public.geometry(Point,4326), geom public.geometry(MultiPolygon,4326), validto date, 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 ); |
logdeleteCREATE TABLE logdelete ( key character varying(50), value character varying(100), delete_by integer REFERENCES users, delete_at timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.logdelete_id_seq'::regclass), scema character varying(100), table 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 ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, reportid integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.methods_id_seq'::regclass), code character varying UNIQUE, hiercode character varying UNIQUE NOT NULL, name character varying[] UNIQUE NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
modemlogLog of modem status CREATE TABLE modemlog ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.modemlog_id_seq'::regclass), days integer, credit integer, pulsacheck timestamp without time zone, modem text, sent integer ); |
modemstatusSnapshot of modem status CREATE TABLE modemstatus ( credit integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.modemstatus_id_seq'::regclass), modem text, phone text, lastcheck timestamp without time zone, status text, sent integer, failed integer, received integer, ssi text, ber text, pulsacheck timestamp without time zone, incoming boolean, operatorid integer REFERENCES sms_operators, comment character varying, days integer, nport integer ); |
modulpelatihanTraining modules CREATE TABLE modulpelatihan ( del boolean NOT NULL DEFAULT false, 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.modulpelatihan_id_seq'::regclass) ); |
monthsCalendar months CREATE TABLE months ( createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.months_id_seq'::regclass), code character varying NOT NULL, modifiedon timestamp without time zone, modifiedby integer REFERENCES users, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
movementAnimal movement reporting (health certificate) master table CREATE TABLE movement ( createdby integer NOT NULL DEFAULT 1 REFERENCES users, 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, ownerphone character varying, ownerid 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() ); |
movementanimalsList of species and number of animals for animal movement reporting CREATE TABLE movementanimals ( 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), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
multilayermapsCREATE TABLE multilayermaps ( savedreportid integer NOT NULL REFERENCES savedreports, listorder smallint, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer, modifiedon timestamp without time zone, modifiedby integer, reportid integer NOT NULL REFERENCES reports, mapreportid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.multilayermaps_id_seq'::regclass) ); |
negativereportsVillage-level negative disease reports CREATE TABLE negativereports ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, checked boolean, msgid bigint NOT NULL, userid integer NOT NULL, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer NOT NULL DEFAULT nextval('data.negativereports_id_seq'::regclass), 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 ( shipmentid integer REFERENCES shipments, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, volume double precision NOT NULL, stocktakeid integer REFERENCES stocktake, receiptid integer REFERENCES receipt, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.nitrogenshipment_id_seq'::regclass) ); |
notifiablesCREATE TABLE notifiables ( modifiedon timestamp without time zone, 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('notifiables_id_seq'::regclass), caseid integer NOT NULL, del boolean NOT NULL DEFAULT false ); |
obat_zataktiftabel obat dan zat aktifnya CREATE TABLE obat_zataktif ( 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, 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), del boolean NOT NULL DEFAULT false ); |
odttemplatesTemplates for ODT reports CREATE TABLE odttemplates ( modifiedby integer REFERENCES users, name character varying, id_infrastructure integer, footer_img character varying, header_img character varying, infra_type integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, sql character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.odttemplates_id_seq'::regclass), filename character varying NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
outboxOutgoing SMS messages CREATE TABLE outbox ( modifiedby integer REFERENCES users, queued timestamp without time zone, msgid bigint, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, priority boolean NOT NULL DEFAULT false, modem character varying, message character varying, phone character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.outbox_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
ownersOwners of animals in a laboratory submission CREATE TABLE owners ( address character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.pemilik_id_seq'::regclass), name character varying, phone phonenumber, locationid integer 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, userid integer, msgid bigint ); |
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 ( 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('parent_species_id_seq'::regclass), name character varying[] NOT NULL, sikhnascode integer NOT NULL ); |
partisipanpelatihanParticipants at a training course CREATE TABLE partisipanpelatihan ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.partisipanpelatihan_id_seq'::regclass), userid integer NOT NULL REFERENCES users, idkursuspelatihan integer NOT NULL REFERENCES kursuspelatihan ); |
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 ( tanggalmulai timestamp without time zone NOT NULL DEFAULT now(), 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(), idpemilik bigint NOT NULL REFERENCES users, idhewan bigint NOT NULL REFERENCES hewan, locationid integer REFERENCES locations, tanggalakhir timestamp without time zone, createdby integer NOT NULL DEFAULT 1 REFERENCES users, lon double precision, lat double precision, geom public.geometry(Point,3857), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.pemilik_hewan_id_seq'::regclass) ); |
pencucian_waletpencucian walet CREATE TABLE pencucian_walet ( nik character varying, address text, manager 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, latitude double precision, longitude double precision, jumlah_pekerja integer, tipe_mitra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('pencucian_walet_id_seq'::regclass), infra_id integer NOT NULL, telp_manager character varying, nkv character varying, nkv_level character varying, nib character varying NOT NULL, pemilik character varying NOT NULL ); |
penolakanPenolakan Pemotongan di RPH CREATE TABLE penolakan ( reportdate timestamp without time zone NOT NULL DEFAULT now(), animaltypeid integer NOT NULL REFERENCES animal_types, alasanpenolakanid integer 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.penolakan_id_seq'::regclass), msgid bigint NOT NULL ); |
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 ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer NOT NULL, name character varying[] NOT NULL, code character varying, createdby integer NOT NULL ); |
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 ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, locationid integer NOT NULL REFERENCES locations, total integer NOT NULL, animaltypeid integer NOT NULL REFERENCES animal_types, 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.population_id_seq'::regclass) ); |
postmortemPemeriksaan postmortem di RPH CREATE TABLE postmortem ( 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(), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.postmortem_id_seq'::regclass), 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 ); |
preventivetreatmentsNon-disease associated individual animal treatments (worming, vaccination etc) CREATE TABLE preventivetreatments ( drugid integer NOT NULL REFERENCES drugs, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint, idhewan integer NOT NULL REFERENCES hewan, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.preventivetreatments_id_seq'::regclass), dose numeric(8,3) ); |
productionsystemsProduction systems CREATE TABLE productionsystems ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, hiercode character varying UNIQUE NOT NULL, code character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.productionsystems_id_seq'::regclass) ); |
produksi_pencucian_waletproduksi pencucian walet CREATE TABLE produksi_pencucian_walet ( kuota_ln_kg double precision, 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_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 ( 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(), kapasitas_kg double precision NOT NULL, produksi_kg double precision NOT NULL, tahun integer NOT NULL, triwulan integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('produksi_rumah_walet_id_seq'::regclass), infra_id integer NOT NULL, createdby integer NOT NULL REFERENCES users, rupiah double precision, siklus_produksi integer ); |
programafkirCulling programs CREATE TABLE programafkir ( name character varying NOT NULL, startdate date NOT NULL DEFAULT now(), enddate date, mandatory boolean NOT NULL DEFAULT false, compensation boolean NOT NULL DEFAULT false, del boolean NOT NULL DEFAULT false, area integer[] NOT NULL, diseaseid integer[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, diseaseeventid integer REFERENCES diseaseevents, modifiedon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.programafkir_id_seq'::regclass) ); |
programtindakanDisease control programs CREATE TABLE programtindakan ( diseaseid integer[] 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(), createdby integer NOT NULL REFERENCES users, 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) ); |
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 ( 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, type purposetypes, name character varying[] NOT NULL, code character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.purposes_id_seq'::regclass) ); |
questionsQuestions sent by SMS CREATE TABLE questions ( 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, 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 ); |
queuestatsSnapshot of SMS outgoing queue CREATE TABLE queuestats ( checked integer, incoming integer, outgoing integer, sent integer, main integer, createdby integer, createdon timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.queuestats_id_seq'::regclass), failed integer ); |
rabiesreportsCREATE TABLE rabiesreports ( animalsbitten integer NOT NULL, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, speciesid integer NOT NULL REFERENCES species, modifiedby integer REFERENCES users, humansbitten integer NOT NULL, caseid integer REFERENCES cases, locationid integer NOT NULL REFERENCES locations, provoked boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.rabiesreports_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL ); |
receiptCREATE TABLE receipt ( datereceived timestamp with time zone NOT NULL DEFAULT now(), 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, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, infrastructureid integer NOT NULL REFERENCES infrastructure ); |
registrationmatrixPermissions for different user types to register other users CREATE TABLE registrationmatrix ( groupid integer NOT NULL REFERENCES groups, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.registrationmatrix_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, canregister integer NOT NULL REFERENCES groups ); |
reportcategoriesCREATE TABLE reportcategories ( modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reportcategories_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 ); |
reporting_queueCREATE TABLE reporting_queue ( modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reporting_queue_id_seq'::regclass), queueid integer NOT NULL REFERENCES reporting_queue_users, reportid integer NOT NULL, daterange character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now() ); |
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 ( createdby integer NOT NULL DEFAULT 116, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.paramslog_id_seq'::regclass), rptid integer, svdrptid integer, link text, uid integer, del boolean NOT NULL DEFAULT false, modifiedby integer, modifiedon timestamp with time zone, params jsonb, createdon timestamp with time zone NOT NULL DEFAULT now() ); |
reportparamsReplaceable parameters for reports CREATE TABLE reportparams ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1, createdon timestamp without time zone NOT NULL DEFAULT now(), paramtype integer NOT NULL REFERENCES reportparamtypes, paramname character varying NOT NULL, prompt character varying[] DEFAULT '{"",""}'::character varying[], lookuptyp integer REFERENCES fieldtypes, lookupqry character varying, lookupfld integer REFERENCES tablefields, checkvalue character varying, mandatory boolean NOT NULL DEFAULT false, dynamic boolean NOT NULL DEFAULT true, dfltval character varying, sortorder integer NOT NULL DEFAULT 1, reportid integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.report_params_id_seq'::regclass), modifiedby integer DEFAULT 1 ); |
reportparamtypesParameter types for reports CREATE TABLE reportparamtypes ( del boolean NOT NULL DEFAULT false, validationregex character varying, typename character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.rptparamtypes_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), description character varying, createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone, modifiedby integer ); |
reportsMaster report definition table CREATE TABLE reports ( sql character varying, max_queue_day integer, bigreportcached boolean NOT NULL DEFAULT false, thumbnails text, category character varying, tag character varying, cache_validity integer DEFAULT 60, cacheable boolean DEFAULT true, widget_update_interval integer DEFAULT 1880, maptype report.maptype, readonly boolean NOT NULL DEFAULT false, source_database reportdatabase NOT NULL DEFAULT 'Replica'::backoffice.reportdatabase, 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 0 REFERENCES users, rcode character varying, naturalorder integer, 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) ); |
reportsTime (in minutes) between updating widget data in static storage (default one day) CREATE TABLE reports ( widget_update_interval integer DEFAULT 1880, maptype report.maptype, readonly boolean NOT NULL DEFAULT false, name character varying[] NOT NULL DEFAULT '{"",""}'::character varying[], source_database reportdatabase NOT NULL DEFAULT 'Replica'::backoffice.reportdatabase, reporttype report.reporttypes, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reports_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 DEFAULT 0 REFERENCES users, rcode character varying, sql character varying, naturalorder integer, web boolean NOT NULL DEFAULT true, public boolean NOT NULL DEFAULT false, permission integer DEFAULT 61 REFERENCES permission_types, max_queue_day integer, bigreportcached boolean NOT NULL DEFAULT false, thumbnails text, category character varying, footnote character varying[] DEFAULT '{"",""}'::character varying[], tag character varying, cache_validity integer DEFAULT 60, caption character varying[] DEFAULT '{"",""}'::character varying[], cacheable boolean DEFAULT true, description character varying[] DEFAULT '{"",""}'::character varying[] ); |
reportsubscriptionsGroup and individual subscriptions to saved reports for automated periodic reporting CREATE TABLE reportsubscriptions ( svdrptid integer NOT NULL REFERENCES savedreports, 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(), active boolean NOT NULL DEFAULT true, groupid integer REFERENCES groups, userid integer REFERENCES users, 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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.reporttags_id_seq'::regclass), modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, createdby integer NOT NULL DEFAULT 1, del boolean NOT NULL DEFAULT false, label character varying[] NOT NULL, prompt character varying, createdon 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.response_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, userid integer NOT NULL REFERENCES users, msgid bigint NOT NULL, caseid integer NOT NULL REFERENCES cases, visited boolean NOT NULL DEFAULT true, diagnosisid integer[] NOT NULL, otherdiagnosis character varying, 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(), 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 ( modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.results_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying[] NOT NULL, createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, code character varying NOT NULL ); |
riwayatvaksinasiVaccination history from priority disease investigation CREATE TABLE riwayatvaksinasi ( diseaseid integer NOT NULL REFERENCES diseases, tanggal 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, msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.riwayatvaksinasi_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases ); |
rphuCREATE TABLE rphu ( hourcapacity double precision, createdon timestamp without time zone NOT NULL DEFAULT now(), carcasskgweight double precision, idcoldstorage integer, operationalend_date date, statuskepemilikan integer NOT NULL, nkv character varying, idinfra integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rphu_id_seq'::regclass), createdby integer NOT NULL, modifiedby integer, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, operationdayperweek double precision, operationhourperday double precision, blastfreezer_tonperhour double precision, chiller_ton double precision, livekgweight double precision ); |
rumah_suplier_pencucian_waletrumah_suplier_pencucian_walet CREATE TABLE rumah_suplier_pencucian_walet ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rumah_suplier_pencucian_walet_id_seq'::regclass), no_registrasi character varying NOT NULL, volume_kg double precision NOT NULL, 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 ); |
rumah_waletkemitraan CREATE TABLE rumah_walet ( 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, tipe_mitra_id integer NOT NULL, nik character varying, address text, manager character varying, nib character varying NOT NULL, infra_id integer NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('rumah_walet_id_seq'::regclass), pemilik character varying NOT NULL, telp_manager character varying, longitude double precision, latitude double precision ); |
sampling_individufor individual sampling CREATE TABLE sampling_individu ( createdby integer NOT NULL DEFAULT 1 REFERENCES users, programid integer NOT NULL REFERENCES surveillanceprograms, 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('sampling_individu_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(), animalid integer NOT NULL ); |
savedreportparamsParameters for saved reports CREATE TABLE savedreportparams ( del boolean NOT NULL DEFAULT false, svdrptid integer NOT NULL REFERENCES savedreports, createdon timestamp without time zone NOT NULL DEFAULT now(), paramvalue character varying, rptparamid integer NOT NULL REFERENCES reportparams, modifiedby integer DEFAULT 1, createdby integer NOT NULL DEFAULT 1, modifiedon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.saved_report_params_id_seq'::regclass) ); |
savedreportsParameterised versions of reports for automated periodic reporting CREATE TABLE savedreports ( active boolean NOT NULL DEFAULT true, public boolean NOT NULL DEFAULT false, 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(), delivery report.reportdelivery, frequency report.reportfrequency, name character varying[] DEFAULT '{"",""}'::character varying[], reportid integer NOT NULL REFERENCES reports, id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.saved_reports_id_seq'::regclass) ); |
selfcheckCREATE TABLE selfcheck ( sent timestamp without time zone, received timestamp without time zone, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sms.selfcheck_id_seq'::regclass), modem character varying ); |
sertifikat_kompartemenCREATE TABLE sertifikat_kompartemen ( start_date date NOT NULL, certificate_number character varying(255), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('sertifikat_kompartemen_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), disease_id integer[] NOT NULL, farm_id integer NOT NULL REFERENCES farms, createdby integer NOT NULL REFERENCES users, end_date date ); |
serversCREATE TABLE servers ( modifiedby integer REFERENCES users, modifiedon timestamp with time zone, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('servers_id_seq'::regclass), name character varying NOT NULL, 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 ( del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sex_id_seq'::regclass), code 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(), modifiedon timestamp without time zone ); |
shipmentsCREATE TABLE shipments ( destuserid integer REFERENCES users, destinfraid integer REFERENCES infrastructure, del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.shipments_id_seq'::regclass), origininfraid integer NOT NULL REFERENCES infrastructure, msgid bigint NOT NULL, datesent timestamp with time zone NOT NULL DEFAULT now() ); |
signreportsDisease report for routine cases, including a list of clinical signs CREATE TABLE signreports ( userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.signreports_id_seq'::regclass), signsid integer[] 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, animalid integer REFERENCES hewan, speciesid integer NOT NULL REFERENCES species, cases integer NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, caseid integer NOT NULL REFERENCES cases, msgid bigint NOT NULL ); |
signsClinical signs CREATE TABLE signs ( modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, synname character varying[], id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.signs_id_seq'::regclass), code character varying UNIQUE, hiercode character varying UNIQUE NOT NULL, name character varying[] NOT NULL, description character varying[], level integer, pelsa boolean NOT NULL DEFAULT false, synonym integer, selectable boolean NOT NULL DEFAULT false, terminal boolean NOT NULL DEFAULT false, general boolean NOT NULL DEFAULT false, specific boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users ); |
signs_asiaCREATE TABLE signs_asia ( cadre boolean DEFAULT false, 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, synonym integer NOT NULL DEFAULT 1, modified_on timestamp without time zone NOT NULL DEFAULT now(), modified_by integer NOT NULL DEFAULT 1, valid_to date, del boolean NOT NULL DEFAULT false, id integer NOT NULL, code character varying NOT NULL, sign character varying[] NOT NULL, description character varying[], hier_code character varying NOT NULL, level integer ); |
signspeciesSigns valid for different species CREATE TABLE signspecies ( del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, speciesid integer NOT NULL REFERENCES species, signid integer NOT NULL REFERENCES signs, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.signspecies_id_seq'::regclass), modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
slaughtertotalsDaily abattoir slaughter totals by animal type CREATE TABLE slaughtertotals ( total integer NOT NULL DEFAULT 0, 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, 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, animaltypeid integer NOT NULL REFERENCES animal_types, msgid bigint NOT NULL ); |
smsMaster table for SMS message definitions CREATE TABLE sms ( readonly boolean NOT NULL DEFAULT false, reportdate_field character varying[] NOT NULL DEFAULT '{createdon}'::character varying[], msgid_field character varying[] NOT NULL DEFAULT '{msgid}'::character varying[], userid_field character varying[] NOT NULL DEFAULT '{createdby}'::character varying[], keyfield character varying[], tablename character varying[], permission character varying, del boolean NOT NULL DEFAULT false, public boolean DEFAULT false, version integer NOT NULL DEFAULT 1, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.sms_id_seq'::regclass), name character varying[] NOT NULL, helptext character varying[], groupid integer REFERENCES sms_groups, error_msg character varying NOT NULL DEFAULT ::character varying, start_code character varying UNIQUE NOT NULL, modifiedon timestamp without time zone, modifiedby integer DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, protected boolean NOT NULL DEFAULT false, alert_sql character varying, reply_sql character varying NOT NULL DEFAULT ::character varying ); |
sms_field_typesField types for SMS message definitions CREATE TABLE sms_field_types ( name character varying NOT NULL, del boolean NOT NULL DEFAULT false, description character varying NOT NULL, app_type character varying, field_type character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_field_types_id_seq'::regclass) ); |
sms_fieldsField definitions for SMS messages CREATE TABLE sms_fields ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.sms_fields_id_seq'::regclass), list_sql character varying, help character varying[], title character varying, hidden boolean NOT NULL DEFAULT false, targettable 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 DEFAULT 1 REFERENCES users, error_msg character varying NOT NULL DEFAULT ::character varying, fieldname character varying NOT NULL DEFAULT ::character varying, lu_sql character varying DEFAULT ::character varying, groupsequence integer NOT NULL DEFAULT 0, data_type integer NOT NULL, optional boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, natorder integer NOT NULL, smsid integer NOT NULL REFERENCES sms ); |
sms_formatCREATE TABLE sms_format ( ?column? text ); |
sms_groupsCREATE TABLE sms_groups ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, natord integer NOT NULL, comment character varying[], name character varying[] 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 ); |
sms_operatorsTelephone network operators CREATE TABLE sms_operators ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_operators_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
sms_prefixesMobile phone prefixes CREATE TABLE sms_prefixes ( 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, operatorid integer NOT NULL REFERENCES sms_operators, prefix integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sms_prefixes_id_seq'::regclass) ); |
smserrorchecksFollow-up by coordinators of users who made errors with SMS formats CREATE TABLE smserrorchecks ( modifiedon timestamp without time zone, action smscheckaction, modifiedby integer, del boolean NOT NULL DEFAULT false, contactdate timestamp without time zone NOT NULL, userid integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.smserrorchecks_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users ); |
speciesSpecies and breeds CREATE TABLE species ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, selectable boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.species_id_seq'::regclass), modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, code character varying UNIQUE, hiercode character varying UNIQUE NOT NULL, lab boolean NOT NULL DEFAULT false, sikhnascode integer, level integer NOT NULL ); |
specimenformsThe form of a laboratory specimen (perservative etc) CREATE TABLE specimenforms ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, code character varying, name character varying[] NOT NULL, hiercode character varying UNIQUE NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.specimenforms_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
specimensSpecimens from animals in a laboratory submission CREATE TABLE specimens ( 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.specimens_id_seq'::regclass), animalid integer NOT NULL REFERENCES animals, specimentypeid integer NOT NULL REFERENCES specimentypes, specimenformid integer NOT NULL REFERENCES specimenforms, createdby integer NOT NULL DEFAULT 1 REFERENCES users ); |
specimentypesThe type of a laboratory specimen (tissue of origin) CREATE TABLE specimentypes ( del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.specimentypes_id_seq'::regclass), code character varying, 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 ); |
sql_featuresCREATE TABLE sql_features ( comments information_schema.character_data, feature_id information_schema.character_data, is_verified_by information_schema.character_data, feature_name information_schema.character_data, sub_feature_id information_schema.character_data, sub_feature_name information_schema.character_data, is_supported information_schema.yes_or_no ); |
sql_implementation_infoCREATE TABLE sql_implementation_info ( comments information_schema.character_data, integer_value information_schema.cardinal_number, implementation_info_id information_schema.character_data, implementation_info_name information_schema.character_data, character_value information_schema.character_data ); |
sql_languagesCREATE TABLE sql_languages ( sql_language_year information_schema.character_data, sql_language_programming_language information_schema.character_data, sql_language_binding_style information_schema.character_data, sql_language_implementation information_schema.character_data, sql_language_integrity information_schema.character_data, sql_language_conformance information_schema.character_data, sql_language_source information_schema.character_data ); |
sql_packagesCREATE TABLE sql_packages ( is_supported information_schema.yes_or_no, feature_name information_schema.character_data, comments information_schema.character_data, is_verified_by information_schema.character_data, feature_id information_schema.character_data ); |
sql_partsCREATE TABLE sql_parts ( is_verified_by information_schema.character_data, is_supported information_schema.yes_or_no, feature_name information_schema.character_data, comments information_schema.character_data, feature_id information_schema.character_data ); |
sql_sizingCREATE TABLE sql_sizing ( supported_value information_schema.cardinal_number, sizing_id information_schema.cardinal_number, sizing_name information_schema.character_data, comments information_schema.character_data ); |
sql_sizing_profilesCREATE TABLE sql_sizing_profiles ( required_value information_schema.cardinal_number, profile_id information_schema.character_data, sizing_name information_schema.character_data, sizing_id information_schema.cardinal_number, comments information_schema.character_data ); |
status_pmkList of status PMK CREATE TABLE status_pmk ( name character varying(20) NOT NULL, description character varying(255), id integer PRIMARY KEY NOT NULL DEFAULT nextval('status_pmk_id_seq'::regclass), modifiedon timestamp without time zone, createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, del boolean NOT NULL DEFAULT false, question character varying(255) ); |
statusasuransistatus asuransi CREATE TABLE statusasuransi ( createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), code character varying NOT NULL, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.statusasuransi_id_seq'::regclass) ); |
statuskepemilikanCREATE TABLE statuskepemilikan ( createdby integer NOT NULL, 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() ); |
statusreproReproductive statuses CREATE TABLE statusrepro ( createdby integer NOT NULL, 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() ); |
stocktakeCREATE TABLE stocktake ( msgid bigint NOT NULL, infrastructureid integer NOT NULL REFERENCES infrastructure, stockdate timestamp with time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.stocktake_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users ); |
stokbibitstokbibit hijauan CREATE TABLE stokbibit ( 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(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.stokbibit_id_seq'::regclass) ); |
strawsStud ID CREATE TABLE straws ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, tanggalproduksi date NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), spesies integer NOT NULL DEFAULT 22 REFERENCES species, idbib integer NOT NULL REFERENCES infrastructure, del boolean NOT NULL DEFAULT false, idhewan bigint NOT NULL REFERENCES hewan, idpejantan character varying NOT NULL, jumlah integer NOT NULL, idpembuatan character varying NOT NULL ); |
strawsList of semen straws for artificial insemination CREATE TABLE straws ( jumlah integer NOT NULL, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false, idhewan bigint NOT NULL REFERENCES hewan, modifiedby integer REFERENCES users, idbib integer NOT NULL REFERENCES infrastructure, createdon timestamp without time zone NOT NULL DEFAULT now(), spesies integer NOT NULL DEFAULT 22 REFERENCES species, idpembuatan character varying NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users, idpejantan character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), tanggalproduksi date NOT NULL ); |
strawsDate of production CREATE TABLE straws ( idbib integer NOT NULL REFERENCES infrastructure, createdon timestamp without time zone NOT NULL DEFAULT now(), jumlah integer NOT NULL, modifiedon timestamp without time zone, idpembuatan character varying NOT NULL, idhewan bigint NOT NULL REFERENCES hewan, tanggalproduksi date NOT NULL, idpejantan character varying NOT NULL, modifiedby integer REFERENCES users, createdby integer NOT NULL DEFAULT 1 REFERENCES users, spesies integer NOT NULL DEFAULT 22 REFERENCES species, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass), del boolean NOT NULL DEFAULT false ); |
strawsCollection Centre CREATE TABLE straws ( idhewan bigint NOT NULL REFERENCES hewan, idbib integer NOT NULL REFERENCES infrastructure, tanggalproduksi date NOT NULL, jumlah integer NOT NULL, idpembuatan character varying NOT NULL, idpejantan character varying NOT NULL, modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1 REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, spesies integer NOT NULL DEFAULT 22 REFERENCES species, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.straws_id_seq'::regclass) ); |
strawsBatch Number CREATE TABLE straws ( idpejantan character varying NOT NULL, idpembuatan character varying NOT NULL, jumlah integer NOT NULL, 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, 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, tanggalproduksi date NOT NULL, idhewan bigint NOT NULL REFERENCES hewan, modifiedon timestamp without time zone ); |
strawshipmentCREATE TABLE strawshipment ( del boolean NOT NULL DEFAULT false, modifiedon timestamp with time zone, modifiedby integer REFERENCES users, createdon timestamp with time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, total integer NOT NULL, strawid integer REFERENCES straws, breedid integer REFERENCES species, stocktakeid integer REFERENCES stocktake, receiptid integer REFERENCES receipt, shipmentid integer REFERENCES shipments, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.strawshipment_id_seq'::regclass) ); |
submission_reasonsCREATE TABLE submission_reasons ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.submission_reasons_id_seq'::regclass), 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(), code character varying UNIQUE NOT NULL ); |
submissionreasonsReason for laboratory submission CREATE TABLE submissionreasons ( modifiedon timestamp without time zone, description 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, name character varying[] NOT NULL, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.submissionreasons_id_seq'::regclass) ); |
submissionsNotification of laboratory submissions from field cases. This is distinct from the lab.labsubmissions table (master table for laboratory submission management) CREATE TABLE submissions ( caseid integer NOT NULL REFERENCES cases, specimentypeid integer NOT NULL REFERENCES specimentypes, specimenformid integer NOT NULL REFERENCES specimenforms, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer DEFAULT 1, 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(), 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 ); |
submittertypesClassification of laboratory submitter types CREATE TABLE submittertypes ( 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.submittertypes_id_seq'::regclass), modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone ); |
sumberReference list of possible sources of introduction of infection CREATE TABLE sumber ( name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.sumber_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, code character varying NOT NULL ); |
sumberanggaransumber anggaran CREATE TABLE sumberanggaran ( 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, name character varying[] NOT NULL, id integer NOT NULL ); |
sumberpenyakitSuspected source of infection as determined during outbreak investigations CREATE TABLE sumberpenyakit ( locationid integer REFERENCES locations, caseid integer NOT NULL REFERENCES cases, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.sumberpenyakit_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, msgid bigint NOT NULL, sumberid integer NOT NULL REFERENCES sumber ); |
surveillanceBoth lab-based and field surveillance reports CREATE TABLE surveillance ( createdby integer NOT NULL DEFAULT 1 REFERENCES users, specimens integer NOT NULL, speciesid integer NOT NULL REFERENCES species, locationid integer NOT NULL REFERENCES locations, programid integer NOT NULL REFERENCES surveillanceprograms, 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.surveillance_id_seq'::regclass), neg integer, pos integer, labid 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() ); |
surveillanceprogramsList of surveillance programs CREATE TABLE surveillanceprograms ( modifiedon timestamp without time zone, area integer[] NOT NULL, enddate date, startdate date NOT NULL DEFAULT now(), name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.surveillanceprograms_id_seq'::regclass), diseaseeventid integer REFERENCES diseaseevents, specimenformid integer[], 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, purpose integer NOT NULL DEFAULT 1, labsectionid integer[] NOT NULL, specimentypeid integer[] NOT NULL, diseaseid integer[] ); |
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, msgid bigint, 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 ); |
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), 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, msgid bigint NOT NULL, userid integer NOT NULL REFERENCES users, reportdate timestamp without time zone NOT NULL DEFAULT now(), cases integer NOT NULL, speciesid integer NOT NULL REFERENCES species, syndromeid integer NOT NULL REFERENCES syndromes, caseid integer NOT NULL REFERENCES cases ); |
syndromesThe disease which the syndrome might reflect CREATE TABLE syndromes ( modifiedon timestamp without time zone, targetdiseaseid integer, modifiedby integer REFERENCES users, createdby integer NOT NULL REFERENCES users, targetspeciesid integer[], code character varying(6) UNIQUE NOT NULL, description character varying[], del boolean NOT NULL DEFAULT false, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass) ); |
syndromesDefined syndromes related to priority diseases CREATE TABLE syndromes ( targetspeciesid integer[], createdon timestamp without time zone NOT NULL DEFAULT now(), code character varying(6) UNIQUE NOT NULL, name character varying[] NOT NULL, description character varying[], createdby integer NOT NULL REFERENCES users, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, targetdiseaseid integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass), del boolean NOT NULL DEFAULT false ); |
syndromesSyndrome name in Bahasa [1] and English [2] CREATE TABLE syndromes ( description character varying[], modifiedby integer REFERENCES users, modifiedon timestamp without time zone, code character varying(6) UNIQUE NOT NULL, targetspeciesid integer[], name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, targetdiseaseid integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.syndromes_id_seq'::regclass) ); |
tablefieldsCREATE TABLE tablefields ( createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean DEFAULT false, modifiedby integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.tablefields_id_seq'::regclass), tableid integer NOT NULL REFERENCES datatables, fldname character varying NOT NULL, displayname character varying[] NOT NULL DEFAULT '{"",""}'::character varying[], description character varying, typeid integer NOT NULL REFERENCES fieldtypes, keyfld boolean NOT NULL DEFAULT false, mandatory boolean NOT NULL DEFAULT false, multiple boolean NOT NULL DEFAULT false, hidden boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, createdby integer NOT NULL DEFAULT 1 ); |
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 ( diseaseid integer REFERENCES diseases, 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(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.targets_id_seq'::regclass) ); |
templatesHTML templates for reporting CREATE TABLE templates ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('report.templates_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedby integer REFERENCES users, comment character varying, template character varying[] NOT NULL, modifiedon timestamp without time zone, code character varying NOT NULL, del boolean NOT NULL DEFAULT false ); |
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 ( jumlahneg integer, jumlahrusak integer, jumlahrusak integer, jumlahrusak integer, 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, 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, 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), id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), testid integer NOT NULL REFERENCES tests, testid integer NOT NULL REFERENCES tests, testid integer NOT NULL REFERENCES tests, findingqual integer REFERENCES findings, findingqual integer REFERENCES findings, findingqual integer REFERENCES findings, 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 ); |
testresultsResults of laboratory testing CREATE TABLE testresults ( modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), uncertaintytypeid integer REFERENCES uncertaintytypes, modifiedon timestamp without time zone, testid integer NOT NULL REFERENCES tests, resultid integer REFERENCES results, findingqual integer REFERENCES findings, createdby integer NOT NULL DEFAULT 1 REFERENCES users, jumlahneg integer, jumlahpos integer, findingquant double precision, jumlahrusak integer, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.testresults_id_seq'::regclass), del boolean NOT NULL DEFAULT false, msgid bigint ); |
testsTests performed on a specimen in a laboratory submission CREATE TABLE tests ( msgid bigint, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, datetested timestamp without time zone NOT NULL, modifiedon timestamp without time zone, testtypeid integer NOT NULL REFERENCES testtypes, specimenid integer NOT NULL REFERENCES specimens, id integer PRIMARY KEY NOT NULL DEFAULT nextval('lab.tests_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users ); |
testtypesMaster table of laboratory test types CREATE TABLE testtypes ( del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, targetid integer NOT NULL REFERENCES targets, modifiedby integer REFERENCES users, methodid integer NOT NULL REFERENCES methods, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tests_id_seq'::regclass), code character varying UNIQUE, rapid boolean NOT NULL DEFAULT false ); |
testunitsQuantitative units for laboratory test findings CREATE TABLE testunits ( del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.testunits_id_seq'::regclass), modifiedby integer REFERENCES users, modifiedon timestamp without time zone ); |
tindakanReference table of disease control activity types CREATE TABLE tindakan ( units character varying[] NOT NULL, hiercode 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(), id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tindakan_id_seq'::regclass), code character varying NOT NULL, createdby integer NOT NULL REFERENCES users ); |
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, tindakanid integer NOT NULL REFERENCES tindakan, jumlah integer NOT NULL, locationid integer NOT NULL 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 ); |
tipe_kemitraankemitraan CREATE TABLE tipe_kemitraan ( modifiedon timestamp without time zone, modifiedby integer REFERENCES users, createdon timestamp without time zone NOT NULL DEFAULT now(), name character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('tipe_kemitraan_id_seq'::regclass), createdby integer NOT NULL REFERENCES users, del boolean NOT NULL DEFAULT false ); |
tipeakhirDisposal types for animals CREATE TABLE tipeakhir ( code character varying NOT NULL, del boolean NOT NULL DEFAULT false, live boolean 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('tipeakhir_id_seq'::regclass), name character varying[] NOT NULL ); |
tipekejadianEvent types for individual animals CREATE TABLE tipekejadian ( 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, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.tipekejadian_id_seq'::regclass), code character varying NOT NULL, name character varying[] NOT NULL ); |
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 ( createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, name character varying[] NOT NULL, hiercode character varying, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('tipepenanganan_id_seq'::regclass), del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, modifiedby integer REFERENCES users ); |
trainingtypesClassification of training course types CREATE TABLE trainingtypes ( createdby integer NOT NULL REFERENCES users, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.trainingtypes_id_seq'::regclass), name character varying[] 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 ); |
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), modifiedby integer REFERENCES users, modifiedon timestamp without time zone, name character varying[] NOT NULL, createdon timestamp without time zone NOT NULL DEFAULT now(), del boolean NOT NULL DEFAULT false, createdby integer NOT NULL REFERENCES users ); |
treatmentanimalsAnimals treated associated with a case CREATE TABLE treatmentanimals ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.treatmentanimals_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, 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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.treatments_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, 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 ); |
ujicepatField rapid test results CREATE TABLE ujicepat ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.ujicepat_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases, testtypeid integer NOT NULL REFERENCES testtypes, speciesid integer NOT NULL REFERENCES species, pos integer NOT NULL, neg 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 ); |
uncertaintytypesUncertainty around a quantitative laboratory test finding (>, <, ~ etc) CREATE TABLE uncertaintytypes ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.uncertaintytypes_id_seq'::regclass), modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, name character varying[] NOT NULL, code character varying NOT NULL, modifiedon timestamp without time zone ); |
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 ( createdon timestamp without time zone NOT NULL DEFAULT now(), modifiedon timestamp without time zone, modifiedby integer, del boolean NOT NULL DEFAULT false, id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.urlinsertfields_id_seq'::regclass), urlinsertjobid integer NOT NULL REFERENCES urlinsertjobs, paramname character varying NOT NULL, paramtype character varying NOT NULL, createdby integer NOT NULL DEFAULT 1 REFERENCES users ); |
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 ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('metadata.urlinsertjobs_id_seq'::regclass), name character varying NOT NULL, insertsql character varying NOT NULL, replysql character varying NOT NULL, 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 ); |
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 NOT NULL REFERENCES users, user_id integer UNIQUE NOT NULL, infra_id integer NOT NULL REFERENCES infrastructure, infra_id integer UNIQUE NOT NULL, 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 ( modifiedby integer REFERENCES users, del boolean NOT NULL DEFAULT false, modifiedon timestamp without time zone, 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 ( nik character varying(16), national_code character varying(255), address text, email_confirm_uuid uuid DEFAULT gen_random_uuid(), email_confirmed timestamp with time zone, restclient_id integer REFERENCES rest_client, 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 ( name character varying(255) NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('users_babinsa_id_seq'::regclass), nrp character varying(20), phone character varying(15), pangkat character varying(30), structure_name character varying(255), status character(10), address text, jabatan character varying(255), 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 ); |
users_otpList OTP code by public register user CREATE TABLE users_otp ( createdon timestamp without time zone DEFAULT CURRENT_TIMESTAMP, verified boolean NOT NULL DEFAULT false, del boolean NOT NULL DEFAULT false, attempt_tries integer DEFAULT 0, expired_at integer DEFAULT 0, token text, modifiedon timestamp without time zone, 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 ); |
users_testCREATE TABLE users_test ( time_expired integer, picture character varying, del boolean, msgid bigint, modifiedon timestamp without time zone, modifiedby integer, locationid integer, pin text, password character varying, userlanguage integer, email character varying, phone phonenumber, surname character varying, firstname character varying, id integer, createdon timestamp without time zone, createdby integer, groupid integer[], infraid integer, area integer[] ); |
vaccination_individuCREATE TABLE vaccination_individu ( msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.vaccination_individu_id_seq'::regclass), reportdate timestamp without time zone NOT NULL DEFAULT now(), userid integer NOT NULL REFERENCES users, programid integer NOT NULL REFERENCES vaccinationprograms, idhewan 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 ); |
vaccination_targetsCREATE TABLE vaccination_targets ( 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, total_target integer ); |
vaccinationprogramsVaccination programs CREATE TABLE vaccinationprograms ( diseaseeventid integer REFERENCES diseaseevents, createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL DEFAULT 1 REFERENCES users, doseskabupaten integer NOT NULL DEFAULT 0, dosesprovinsi integer NOT NULL DEFAULT 0, dosespusat integer NOT NULL DEFAULT 0, purpose integer NOT NULL DEFAULT 1, vaccineid integer[] NOT NULL, 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.vaccinationprograms_id_seq'::regclass), name character varying NOT NULL, modifiedby integer REFERENCES users, modifiedon timestamp without time zone, del boolean NOT NULL DEFAULT false ); |
vaccinationsVillage/farm level vaccination events associated with a vaccination program CREATE TABLE vaccinations ( del boolean NOT NULL DEFAULT false, locationid integer NOT NULL REFERENCES locations, programid integer NOT NULL REFERENCES vaccinationprograms, 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.vaccinations_id_seq'::regclass), speciesid integer NOT NULL REFERENCES species, firstdose integer NOT NULL DEFAULT 0, booster integer, 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 ); |
vachistoryVaccination history of an animal in a laboratory submission CREATE TABLE vachistory ( vacdate date, 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, 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 ( ferr character varying, fsql character varying, terr character varying, tsql character varying ); |
warnaAnimal colour CREATE TABLE warna ( 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.warna_id_seq'::regclass) ); |
weekdaysDays of the week CREATE TABLE weekdays ( 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, code character varying NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.weekdays_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now() ); |
yii2sessionCREATE TABLE yii2session ( id character varying NOT NULL, expire integer, data text ); |
yiisessionSession management for web system CREATE TABLE yiisession ( userid integer, recordid integer UNIQUE NOT NULL DEFAULT nextval('backoffice.yiisession_recordid_seq'::regclass), data text, expire integer, id character varying PRIMARY KEY NOT NULL ); |
zataktifComposition of drugs by regulation status CREATE TABLE zataktif ( id integer PRIMARY KEY NOT NULL DEFAULT nextval('reference.zataktif_id_seq'::regclass), createdon timestamp without time zone NOT NULL DEFAULT now(), createdby integer NOT NULL REFERENCES users, modifiedon timestamp without time zone, code character varying, name character varying[] NOT NULL, del boolean NOT NULL DEFAULT false, modifiedby integer REFERENCES users ); |
zoonosesData on human involvement in suspected zoonotic disease cases CREATE TABLE zoonoses ( terpapar integer 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(), sakit integer NOT NULL, mati integer NOT NULL, createdby integer NOT NULL REFERENCES users, msgid bigint NOT NULL, id integer PRIMARY KEY NOT NULL DEFAULT nextval('data.zoonoses_id_seq'::regclass), caseid integer NOT NULL REFERENCES cases ); |