-- Sequence: id_hisris_seq

-- DROP SEQUENCE id_hisris_seq;

CREATE SEQUENCE id_hisris_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
ALTER TABLE id_hisris_seq
  OWNER TO postgres;


/*
Date: 2015-08-06 17:32:47
*/


-- ----------------------------
-- Table structure for ti_hisris
-- ----------------------------
DROP TABLE IF EXISTS "public"."ti_hisris";
CREATE TABLE "public"."ti_hisris" (
"id" int4 DEFAULT nextval('id_hisris_seq'::regclass) NOT NULL,
"idagrupado" int4,
"fuente" varchar(2) COLLATE "default",
"nrodoc" varchar(50) COLLATE "default",
"nlinea" varchar(100) COLLATE "default",
"origen" varchar(1) COLLATE "default",
"codser" varchar(2) COLLATE "default",
"tipide" varchar(2) COLLATE "default",
"nroide" varchar(20) COLLATE "default",
"nombre" varchar(20) COLLATE "default",
"apell1" varchar(15) COLLATE "default",
"apell2" varchar(15) COLLATE "default" NOT NULL,
"telefo" varchar(25) COLLATE "default",
"celula" varchar(20) COLLATE "default",
"direcc" varchar(100) COLLATE "default",
"sexo" varchar(1) COLLATE "default",
"zresid" varchar(1) COLLATE "default",
"tipmed" varchar(1) COLLATE "default",
"medico" varchar(20) COLLATE "default",
"codact" varchar(6) COLLATE "default",
"nomact" varchar(512) COLLATE "default",
"obsord" varchar(255) COLLATE "default",
"fnacim" varchar(20) COLLATE "default",
"rhsang" varchar(4) COLLATE "default",
"correo" varchar(40) COLLATE "default",
"fechas" varchar(21) COLLATE "default" NOT NULL,
"esthis" varchar(2) COLLATE "default",
"codusr" varchar(20) COLLATE "default",
"nrosol" varchar(15) COLLATE "default",
"fechar" varchar(21) COLLATE "default" NOT NULL,
"codtec" varchar(20) COLLATE "default",
"codrad" varchar(20) COLLATE "default",
"estris" varchar(10) COLLATE "default",
"result" varchar(4000) COLLATE "default",
"nomrem" varchar(30) COLLATE "default",
"lectura" bool DEFAULT true,
"reporte" bool DEFAULT false,
"codigounico" varchar(100) COLLATE "default"
)
WITH (OIDS=FALSE)

;

-- ----------------------------
-- Alter Sequences Owned By 
-- ----------------------------

-- ----------------------------
-- Primary Key structure for table ti_hisris
-- ----------------------------
ALTER TABLE "public"."ti_hisris" ADD PRIMARY KEY ("id");