-- Table: public.Encounter

-- DROP TABLE public."Encounter";

CREATE TABLE public."ObEncounter"
(
    "OBEncounterId" bigserial NOT NULL,
    "AppointmentId" integer,
    "OBEncounterDate" timestamp(6) without time zone NOT NULL,
    "Vitals" text COLLATE pg_catalog."default",
    "ProblemList" text COLLATE pg_catalog."default",
    "BriefRos" text COLLATE pg_catalog."default",
    "Active" boolean NOT NULL DEFAULT true,
    "CreatedBy" integer NOT NULL,
    "CreatedDate" timestamp(6) without time zone NOT NULL,
    "ModifiedBy" integer,
    "ModifiedDate" timestamp(6) without time zone,
    "AdmissionId" integer,
    CONSTRAINT "OBEncounter_pkey" PRIMARY KEY ("OBEncounterId"),
    CONSTRAINT "UQ_OBEncounter" UNIQUE ("AppointmentId")
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TYPE encountertype_elements ADD VALUE 'OBEncounter';