CREATE TABLE TMP_FCT_COLETAMEDICAOFATURA (
	NRSEQCONTRATO  	   NUMBER,
	NRPARCFATURA 	   NUMBER,
	IDELEMENTORAIZ 	   VARCHAR2(100),
	CDSERVORCA 		   NUMBER,
	CDTPMEDIDAVARIAVEL NUMBER,
	DTINICOMPET 	   DATE,
	DTFINCOMPET 	   DATE,
	QTMEDIDAVARIAVEL   NUMBER,
	QTMEDIDAMEDICAO    NUMBER,
	DTCOLETAVALIDAOM   DATE,
	QTMEDIDAVALIDAOM   NUMBER,
	DTULTIMACOLETAOM   DATE,
	QTULTIMAMEDIDAOM   NUMBER,
	VRITEMCONT 		   NUMBER, 
	VRITEMCONTCOMDESC  NUMBER,
	IDMULTIPVARIACAO   VARCHAR2(1),
	ORIGEMCOLETA 	   VARCHAR2(20),
	NRORG              NUMBER 	      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO            VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
    DTINCLUSAO         DATE            DEFAULT SYSDATE,
    DTULTATU           DATE            DEFAULT SYSDATE,
    NRORGINCLUSAO      NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERINCLUSAO     VARCHAR2(12)    DEFAULT '1' 					NULL,
    NRORGULTATU        NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERULTATU       VARCHAR2(12)    DEFAULT '1',
		CONSTRAINT CKC_IDATIVO_TMP_FCT_COLMEDIFAT CHECK (IDATIVO IN ('S','N'))
)
/