-- http://www.phpmyadmin.net
--




--
-- Database: `hospitaldb`
--

-- --------------------------------------------------------

--
-- Table structure for table `tbladmitting`
--

CREATE TABLE IF NOT EXISTS `tbladmitting` (
  `ADMITTINGID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ROOMID` int(40) NOT NULL,
  `BEDID` int(11) NOT NULL,
  `DATEADMIT` datetime NOT NULL,
  `DOCID` int(11) NOT NULL,
  `ADMITTINGDIAGNOSIS` varchar(90) NOT NULL,
  `ADMITTINGSTATUS` tinyint(1) NOT NULL,
  `USERID` int(11) NOT NULL,
  PRIMARY KEY (`ADMITTINGID`),
  KEY `ROOMID` (`ROOMID`),
  KEY `CASENUM` (`CASENUM`),
  KEY `BEDID` (`BEDID`),
  KEY `DOCID` (`DOCID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=36 ;

--
-- Dumping data for table `tbladmitting`
--

INSERT INTO `tbladmitting` (`ADMITTINGID`, `CASENUM`, `ROOMID`, `BEDID`, `DATEADMIT`, `DOCID`, `ADMITTINGDIAGNOSIS`, `ADMITTINGSTATUS`, `USERID`) VALUES
(30, 1010115, 1001230, 5, '2016-03-06 05:00:00', 102109, '', 1, 0),
(31, 321, 1001236, 2, '2016-03-06 06:00:00', 1021024, '', 1, 0),
(32, 1010116, 1001238, 9, '2016-03-06 02:00:00', 1021014, '', 1, 0),
(33, 1010117, 1001239, 11, '2016-03-06 02:00:00', 1021014, '', 1, 0),
(34, 1010118, 1001244, 47, '2016-03-06 11:00:00', 1021019, '', 1, 0),
(35, 101011, 1001244, 48, '2016-03-07 01:00:00', 1021018, '', 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `tblautonumber`
--

CREATE TABLE IF NOT EXISTS `tblautonumber` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `STRT` varchar(30) NOT NULL,
  `END` int(30) NOT NULL,
  `INCREMENT` int(11) NOT NULL,
  `DESCRIPTION` varchar(30) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `tblautonumber`
--

INSERT INTO `tblautonumber` (`ID`, `STRT`, `END`, `INCREMENT`, `DESCRIPTION`) VALUES
(1, 'user', 1, 1, 'userid'),
(2, '10012', 61, 1, 'roomid'),
(3, '10210', 29, 1, 'docid'),
(4, '10101', 20, 1, 'casenum'),
(5, '0', 36, 1, 'admitid');

-- --------------------------------------------------------

--
-- Table structure for table `tblbed`
--

CREATE TABLE IF NOT EXISTS `tblbed` (
  `BEDID` int(11) NOT NULL AUTO_INCREMENT,
  `BEDNUM` int(11) NOT NULL,
  `STATUS` varchar(30) NOT NULL,
  `ROOMID` int(11) NOT NULL,
  PRIMARY KEY (`BEDID`),
  KEY `ROOMID` (`ROOMID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=138 ;

--
-- Dumping data for table `tblbed`
--

INSERT INTO `tblbed` (`BEDID`, `BEDNUM`, `STATUS`, `ROOMID`) VALUES
(16, 1, 'Available', 1001240),
(17, 2, 'Available', 1001240),
(18, 3, 'Available', 1001240),
(19, 4, 'Available', 1001240),
(20, 5, 'Available', 1001240),
(21, 6, 'Available', 1001240),
(22, 7, 'Available', 1001240),
(23, 8, 'Available', 1001240),
(24, 1, 'Available', 1001241),
(25, 2, 'Available', 1001241),
(26, 3, 'Available', 1001241),
(27, 4, 'Available', 1001241),
(28, 5, 'Available', 1001241),
(29, 6, 'Available', 1001241),
(30, 7, 'Available', 1001241),
(31, 8, 'Available', 1001241),
(32, 1, 'Available', 1001242),
(33, 2, 'Available', 1001242),
(34, 3, 'Available', 1001242),
(35, 4, 'Available', 1001242),
(36, 5, 'Available', 1001242),
(37, 6, 'Available', 1001242),
(38, 7, 'Available', 1001242),
(39, 8, 'Available', 1001242),
(40, 1, 'Available', 1001243),
(41, 2, 'Available', 1001243),
(42, 3, 'Available', 1001243),
(43, 4, 'Available', 1001243),
(44, 5, 'Available', 1001243),
(45, 6, 'Available', 1001243),
(46, 7, 'Available', 1001243),
(47, 1, 'NotAvailable', 1001244),
(48, 2, 'NotAvailable', 1001244),
(49, 3, 'Available', 1001244),
(50, 4, 'Available', 1001244),
(51, 5, 'Available', 1001244),
(52, 6, 'Available', 1001244),
(53, 7, 'Available', 1001244),
(54, 1, 'Available', 1001245),
(55, 2, 'Available', 1001245),
(56, 3, 'Available', 1001245),
(57, 4, 'Available', 1001245),
(58, 5, 'Available', 1001245),
(59, 6, 'Available', 1001245),
(60, 1, 'Available', 1001246),
(61, 2, 'Available', 1001246),
(62, 3, 'Available', 1001246),
(63, 4, 'Available', 1001246),
(64, 5, 'Available', 1001246),
(65, 6, 'Available', 1001246),
(66, 7, 'Available', 1001246),
(67, 1, 'Available', 1001247),
(68, 2, 'Available', 1001247),
(69, 3, 'Available', 1001247),
(70, 4, 'Available', 1001247),
(71, 5, 'Available', 1001247),
(72, 6, 'Available', 1001247),
(73, 1, 'Available', 1001248),
(74, 2, 'Available', 1001248),
(75, 3, 'Available', 1001248),
(76, 4, 'Available', 1001248),
(77, 5, 'Available', 1001248),
(78, 6, 'Available', 1001248),
(79, 7, 'Available', 1001248),
(80, 1, 'Available', 1001249),
(81, 2, 'Available', 1001249),
(82, 3, 'Available', 1001249),
(83, 4, 'Available', 1001249),
(84, 5, 'Available', 1001249),
(85, 6, 'Available', 1001249),
(86, 7, 'Available', 1001249),
(87, 1, 'Available', 1001250),
(88, 2, 'Available', 1001250),
(89, 3, 'Available', 1001250),
(90, 4, 'Available', 1001250),
(91, 5, 'Available', 1001250),
(92, 6, 'Available', 1001250),
(93, 7, 'Available', 1001250),
(94, 8, 'Available', 1001250),
(95, 1, 'Available', 1001251),
(96, 2, 'Available', 1001251),
(97, 3, 'Available', 1001251),
(98, 4, 'Available', 1001251),
(99, 5, 'Available', 1001251),
(100, 1, 'Available', 1001252),
(101, 2, 'Available', 1001252),
(102, 3, 'Available', 1001252),
(103, 4, 'Available', 1001252),
(104, 5, 'Available', 1001252),
(105, 6, 'Available', 1001252),
(106, 7, 'Available', 1001252),
(107, 1, 'Available', 1001253),
(108, 2, 'Available', 1001253),
(109, 1, 'Available', 1001254),
(110, 2, 'Available', 1001254),
(111, 1, 'Available', 1001255),
(112, 2, 'Available', 1001255),
(113, 1, 'Available', 1001256),
(114, 2, 'Available', 1001256),
(115, 1, 'Available', 1001257),
(116, 2, 'Available', 1001257),
(117, 1, 'Available', 1001258),
(118, 2, 'Available', 1001258),
(119, 3, 'Available', 1001258),
(120, 4, 'Available', 1001258),
(121, 5, 'Available', 1001258),
(122, 6, 'Available', 1001258),
(123, 7, 'Available', 1001258),
(124, 1, 'Available', 1001259),
(125, 2, 'Available', 1001259),
(126, 3, 'Available', 1001259),
(127, 4, 'Available', 1001259),
(128, 5, 'Available', 1001259),
(129, 6, 'Available', 1001259),
(130, 7, 'Available', 1001259),
(131, 1, 'Available', 1001260),
(132, 2, 'Available', 1001260),
(133, 3, 'Available', 1001260),
(134, 4, 'Available', 1001260),
(135, 5, 'Available', 1001260),
(136, 6, 'Available', 1001260),
(137, 7, 'Available', 1001260);

-- --------------------------------------------------------

--
-- Table structure for table `tblbiling`
--

CREATE TABLE IF NOT EXISTS `tblbiling` (
  `BILLINGID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADDMITINGID` int(11) NOT NULL,
  `DISCHARGEID` int(11) NOT NULL,
  `NUMDAYS` int(11) NOT NULL,
  `OR/DRFEE` double NOT NULL,
  `OR/DRSUPPLIES` double NOT NULL,
  `MEDICINERF` double NOT NULL,
  `LAB` double NOT NULL,
  `XRAY` double NOT NULL,
  `OXYGEN` double NOT NULL,
  `ECG/UTZ` double NOT NULL,
  `CARDIACMONITOR` double NOT NULL,
  `BLOODSTORAGEFEE` double NOT NULL,
  `NEWBORN` double NOT NULL,
  `NEBULIZATION` double NOT NULL,
  `DILILIGHTFEE` double NOT NULL,
  `ELECCURRENT` double NOT NULL,
  `IVINSERTION` double NOT NULL,
  `DRESSIING` double NOT NULL,
  `PROFESSIONALFEE` double NOT NULL,
  `TOTAL` double NOT NULL,
  PRIMARY KEY (`BILLINGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tblbiling`
--


-- --------------------------------------------------------

--
-- Table structure for table `tblbprecord`
--

CREATE TABLE IF NOT EXISTS `tblbprecord` (
  `BPID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADMITTINGID` int(11) NOT NULL,
  `BPDATE` date NOT NULL,
  `BPTIME` time NOT NULL,
  `BP` varchar(35) NOT NULL,
  `PR` varchar(35) NOT NULL,
  `RR` varchar(35) NOT NULL,
  `USERID` int(11) NOT NULL,
  PRIMARY KEY (`BPID`),
  KEY `ADMITTINGID` (`ADMITTINGID`),
  KEY `CASENUM` (`CASENUM`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `tblbprecord`
--

INSERT INTO `tblbprecord` (`BPID`, `CASENUM`, `ADMITTINGID`, `BPDATE`, `BPTIME`, `BP`, `PR`, `RR`, `USERID`) VALUES
(1, 321, 31, '2016-03-06', '06:51:50', 'asd', 'asd', 'ad', 0),
(2, 1010117, 33, '2016-03-06', '14:50:13', '100/90', '50/12', '23/34', 0);

-- --------------------------------------------------------

--
-- Table structure for table `tbldiagnosis`
--

CREATE TABLE IF NOT EXISTS `tbldiagnosis` (
  `DIAGNOSISID` int(11) NOT NULL AUTO_INCREMENT,
  `DIAGNOSIS` varchar(125) NOT NULL,
  `DESCRIPTION` varchar(125) NOT NULL,
  PRIMARY KEY (`DIAGNOSISID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `tbldiagnosis`
--

INSERT INTO `tbldiagnosis` (`DIAGNOSISID`, `DIAGNOSIS`, `DESCRIPTION`) VALUES
(1, 'Pneumonia', ''),
(2, 'PTB', ''),
(3, 'CVA', ''),
(4, 'HPN/HCVD', '');

-- --------------------------------------------------------

--
-- Table structure for table `tbldischargesummary`
--

CREATE TABLE IF NOT EXISTS `tbldischargesummary` (
  `DISCHARGEID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADMITTINGID` int(11) NOT NULL,
  `HOSPITALNO` int(11) NOT NULL,
  `PHYSICIAN` varchar(90) NOT NULL,
  `ADMITTINGCLERK` varchar(30) NOT NULL,
  `TYPEOFADMISSION` varchar(125) NOT NULL,
  `REFERREDBY` varchar(125) NOT NULL,
  `SOCIALSERVICECLASS` varchar(125) NOT NULL,
  `ALERGICTO` varchar(125) NOT NULL,
  `HOSPITALIZATIONPLAN` varchar(125) NOT NULL,
  `HEALTHINSURANCE` varchar(125) NOT NULL,
  `PHIC` varchar(125) NOT NULL,
  `DATAFURNISHBY` varchar(125) NOT NULL,
  `ADDOFINFORMANT` varchar(125) NOT NULL,
  `RELATIONTOPATIEN` varchar(125) NOT NULL,
  `OTHERDIAGNOSIS` varchar(255) NOT NULL,
  `FINALDIAGNOSIS` varchar(255) NOT NULL,
  `ICD_RUVCODE` varchar(90) NOT NULL,
  `DISPOSISTION` varchar(90) NOT NULL,
  `RESULT` varchar(90) NOT NULL,
  `CHIEFCOMPLAINT` varchar(255) NOT NULL,
  `DISCHARGEDDATE` date NOT NULL,
  `USERID` int(11) NOT NULL,
  `PRINCIPALOPERATION` varchar(152) NOT NULL,
  `OTHEROPERATION` varchar(125) NOT NULL,
  PRIMARY KEY (`DISCHARGEID`),
  KEY `PATIENTID` (`CASENUM`),
  KEY `ADMITTINGID` (`ADMITTINGID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `tbldischargesummary`
--

INSERT INTO `tbldischargesummary` (`DISCHARGEID`, `CASENUM`, `ADMITTINGID`, `HOSPITALNO`, `PHYSICIAN`, `ADMITTINGCLERK`, `TYPEOFADMISSION`, `REFERREDBY`, `SOCIALSERVICECLASS`, `ALERGICTO`, `HOSPITALIZATIONPLAN`, `HEALTHINSURANCE`, `PHIC`, `DATAFURNISHBY`, `ADDOFINFORMANT`, `RELATIONTOPATIEN`, `OTHERDIAGNOSIS`, `FINALDIAGNOSIS`, `ICD_RUVCODE`, `DISPOSISTION`, `RESULT`, `CHIEFCOMPLAINT`, `DISCHARGEDDATE`, `USERID`, `PRINCIPALOPERATION`, `OTHEROPERATION`) VALUES
(1, 1010117, 33, 1010117, 'Select', 'Jopette Barroa', '', 'Evan Lloyd Salazar', '', 'Generic Medicine', '', '', '', 'Marvin Gonzales', 'Cauayan', 'Son', 'N/A', 'Tubercolusis', 'sdf34rff', 'Discharge', 'Improve', 'No Remarks', '2016-03-06', 0, '', '');

-- --------------------------------------------------------

--
-- Table structure for table `tbldoctor`
--

CREATE TABLE IF NOT EXISTS `tbldoctor` (
  `DOCID` int(11) NOT NULL AUTO_INCREMENT,
  `DOCNAME` varchar(90) NOT NULL,
  `DOCFIELDS` varchar(255) NOT NULL,
  `CONTACTNUM` varchar(30) NOT NULL,
  PRIMARY KEY (`DOCID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1021028 ;

--
-- Dumping data for table `tbldoctor`
--

INSERT INTO `tbldoctor` (`DOCID`, `DOCNAME`, `DOCFIELDS`, `CONTACTNUM`) VALUES
(102108, 'Ester F. Belleza , M.D', 'General Practitioner', '0986352212'),
(102109, 'Jeffty C. Castillon, M.D.', 'Internal Medicine', '0912256468'),
(1021010, 'Ralston S. Ramos, M.D.', 'Surgeon', ''),
(1021011, 'Irene C. Benares, M.D.', 'Pediatrician', ''),
(1021012, 'Jocelle N. Delos Santos, M.D,', 'OB-GYNE', ''),
(1021013, 'John Vic C. Caagbay, M,D,', 'General Practitioner', ''),
(1021014, 'Gyle E. Abelarde, M,D', 'Internal Medicine', ''),
(1021015, 'Bemyl Teresa C. Prescion,M,D', 'OB-GYNE', ''),
(1021016, 'Josephine Bryan Tiu,M,D', 'Internal Medicine', ''),
(1021017, 'Mynah M. Repique, M.D.', 'OB-GYNE', ''),
(1021018, 'Kenneth George J. Alerta,M,D', 'Surgeon', ''),
(1021019, 'Ian Lee V. Marb,M,D', 'Surgeon', ''),
(1021020, 'Claudelle M. Marba,M,D', 'Pediatrician', ''),
(1021021, 'Therese Larae E. Morata,M,D', 'Surgeon', ''),
(1021022, 'Ever Joy P. Nono,M,D', 'Pediatrician', ''),
(1021023, 'Neo O. Maravilla,M,D', 'OB-GYNE', ''),
(1021024, 'Mark Francis G. Claparols,M,D', 'Surgeon', ''),
(1021025, 'Mia Marie Tad-y - Uy,M,D', 'Surgeon', ''),
(1021026, 'Norjannah D. Beltran,', 'Anestrician', ''),
(1021027, 'Rey R. Geraldoy', 'OB-GYNE', '');

-- --------------------------------------------------------

--
-- Table structure for table `tblivfrecord`
--

CREATE TABLE IF NOT EXISTS `tblivfrecord` (
  `IVFID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADDMITINGID` int(11) NOT NULL,
  `IVFDATE` date NOT NULL,
  `BOTTLENUM` varchar(30) NOT NULL,
  `KINDOFSOLUTION` varchar(90) NOT NULL,
  `IVFAMOUNT` varchar(90) NOT NULL,
  `MEDICATIONADDERT` varchar(90) NOT NULL,
  `IVFRATE` varchar(90) NOT NULL,
  `STARTEDTIME` varchar(30) NOT NULL,
  `STARTNURSE` varchar(90) NOT NULL,
  `ENDEDTIME` varchar(30) NOT NULL,
  `ENDNURSE` varchar(90) NOT NULL,
  `ENDDATE` date NOT NULL,
  `IVFREMARKS` varchar(90) NOT NULL,
  PRIMARY KEY (`IVFID`),
  KEY `CASENUM` (`CASENUM`,`ADDMITINGID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `tblivfrecord`
--

INSERT INTO `tblivfrecord` (`IVFID`, `CASENUM`, `ADDMITINGID`, `IVFDATE`, `BOTTLENUM`, `KINDOFSOLUTION`, `IVFAMOUNT`, `MEDICATIONADDERT`, `IVFRATE`, `STARTEDTIME`, `STARTNURSE`, `ENDEDTIME`, `ENDNURSE`, `ENDDATE`, `IVFREMARKS`) VALUES
(1, 321, 31, '2016-03-06', '213', 'w', 'wqe', 'wqe', 'wq', '08:26:19', 'wqe', '08:26:19', '', '2016-03-06', '');

-- --------------------------------------------------------

--
-- Table structure for table `tbllaboratory`
--

CREATE TABLE IF NOT EXISTS `tbllaboratory` (
  `LABID` int(11) NOT NULL AUTO_INCREMENT,
  `MEDICATIONID` int(11) NOT NULL,
  `LABDATE` datetime NOT NULL,
  `LABDESC` varchar(125) NOT NULL,
  PRIMARY KEY (`LABID`),
  KEY `MEDICATIONID` (`MEDICATIONID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tbllaboratory`
--


-- --------------------------------------------------------

--
-- Table structure for table `tblmedicalchecklist`
--

CREATE TABLE IF NOT EXISTS `tblmedicalchecklist` (
  `MEDCHECK_ID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  PRIMARY KEY (`MEDCHECK_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tblmedicalchecklist`
--


-- --------------------------------------------------------

--
-- Table structure for table `tblmedication`
--

CREATE TABLE IF NOT EXISTS `tblmedication` (
  `MEDICATIONID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `MEDICATIONDATE` datetime NOT NULL,
  `MEDECATION` varchar(200) NOT NULL,
  `TREATMENT` varchar(255) NOT NULL,
  `DOCID` int(11) NOT NULL,
  `ADMITTINGID` int(11) NOT NULL,
  PRIMARY KEY (`MEDICATIONID`),
  KEY `CASENUM` (`CASENUM`),
  KEY `DOCID` (`DOCID`),
  KEY `ADMITTINGID` (`ADMITTINGID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `tblmedication`
--

INSERT INTO `tblmedication` (`MEDICATIONID`, `CASENUM`, `MEDICATIONDATE`, `MEDECATION`, `TREATMENT`, `DOCID`, `ADMITTINGID`) VALUES
(1, 321, '2016-03-06 06:00:00', 'sdasd', 'asdas', 1021024, 31),
(2, 321, '2016-03-06 06:00:00', 'asd', 'sadasdas', 1021024, 31),
(3, 1010116, '2016-03-06 02:00:00', 'Nebulizer', 'Every 4hours', 1021014, 32),
(4, 1010117, '2016-03-06 02:00:00', 'Nebulizer', 'Every 4hours', 1021014, 33),
(5, 1010118, '2016-03-06 11:00:00', 'test', 'test', 1021019, 34),
(6, 101011, '2016-03-07 01:00:00', 'sadas', 'sadasdas', 1021018, 35),
(7, 101011, '2016-03-07 01:00:00', 'asdas', 'sadasd', 1021018, 35);

-- --------------------------------------------------------

--
-- Table structure for table `tblnewborn`
--

CREATE TABLE IF NOT EXISTS `tblnewborn` (
  `NEWBORNID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `CNAME` varchar(125) NOT NULL,
  `MCASENUM` int(11) NOT NULL,
  `DBIRTH` date NOT NULL,
  `TYPOFBIRTH` varchar(30) NOT NULL,
  `CSEX` varchar(30) NOT NULL,
  `WEIGHTBIRTH` varchar(30) NOT NULL,
  `TIMEBIRTH` time NOT NULL,
  `DOCID` int(11) NOT NULL,
  `BIRTHORDER` varchar(30) NOT NULL,
  `CITIZENFATHER` varchar(30) NOT NULL,
  `RELIGONFATHER` varchar(30) NOT NULL,
  `CHILDRENBORNALIVE` int(11) NOT NULL,
  `NOCHILDRENSTILLLIVING` int(11) NOT NULL,
  `NOCHILDRENDEAD` int(11) NOT NULL,
  `FOCCUPATION` varchar(30) NOT NULL,
  `FAGE` int(11) NOT NULL,
  `RADDRESS` varchar(125) NOT NULL,
  `INFORMAL` varchar(30) NOT NULL,
  `RELATIONCHILD` varchar(30) NOT NULL,
  PRIMARY KEY (`NEWBORNID`),
  KEY `DOCID` (`DOCID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `tblnewborn`
--

INSERT INTO `tblnewborn` (`NEWBORNID`, `CASENUM`, `CNAME`, `MCASENUM`, `DBIRTH`, `TYPOFBIRTH`, `CSEX`, `WEIGHTBIRTH`, `TIMEBIRTH`, `DOCID`, `BIRTHORDER`, `CITIZENFATHER`, `RELIGONFATHER`, `CHILDRENBORNALIVE`, `NOCHILDRENSTILLLIVING`, `NOCHILDRENDEAD`, `FOCCUPATION`, `FAGE`, `RADDRESS`, `INFORMAL`, `RELATIONCHILD`) VALUES
(1, 0, 'sasa', 0, '2016-03-08', 'Single', 'Male', '12', '12:26:06', 1021011, 'asdas', 'asd', 'sad', 2, 1, 1, 'sdasd', 12, 'asdasdas', 'asdasd', 'asdasdasd'),
(2, 0, 'wwswedasdas', 0, '2016-03-08', 'Single', 'Female', '21', '12:34:41', 1021015, 'asdasd', 'sad', 'sad', 21, 21, 0, 'asd', 122, 'sadasd', 'asdas', 'asdasdas'),
(3, 1010119, '1010115', 0, '2016-03-08', 'Select', 'Male', '12', '01:13:27', 1021012, '', 'sad', 'ads', 1, 1, 1, 'sadas', 22, 'sad', 'sad', 'sad'),
(5, 1010119, 'WSADASDAS', 101012, '2016-03-08', 'Single', 'Male', '21', '01:28:17', 1021023, 'FIRST', 'SADAS', 'SAD', 1, 2, 2, 'ASDAS', 122, 'ADS', 'DA', 'ADASDASD');

-- --------------------------------------------------------

--
-- Table structure for table `tblnursenotes`
--

CREATE TABLE IF NOT EXISTS `tblnursenotes` (
  `NOTESID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADDMITINGID` int(11) NOT NULL,
  `NOTESDATE` date NOT NULL,
  `NOTESTIME` time NOT NULL,
  `FOCUS` varchar(125) NOT NULL,
  `NOTESDATA` varchar(125) NOT NULL,
  `NOTESACTION` varchar(125) NOT NULL,
  `NOTESRESPONSE` varchar(125) NOT NULL,
  PRIMARY KEY (`NOTESID`),
  KEY `CASENUM` (`CASENUM`,`ADDMITINGID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `tblnursenotes`
--

INSERT INTO `tblnursenotes` (`NOTESID`, `CASENUM`, `ADDMITINGID`, `NOTESDATE`, `NOTESTIME`, `FOCUS`, `NOTESDATA`, `NOTESACTION`, `NOTESRESPONSE`) VALUES
(1, 321, 31, '2016-03-06', '08:24:30', 'sad', 'das', 'sad', 'sa');

-- --------------------------------------------------------

--
-- Table structure for table `tblnurserydischargesummary`
--

CREATE TABLE IF NOT EXISTS `tblnurserydischargesummary` (
  `NURSERYID` int(11) NOT NULL AUTO_INCREMENT,
  `ADMITTINGID` int(11) NOT NULL,
  `NAME` varchar(90) NOT NULL,
  `DBIRTH` date NOT NULL,
  `TBIRTH` time NOT NULL,
  `ADD` varchar(90) NOT NULL,
  `BIRTHWEIGHT` varchar(4) NOT NULL,
  `HEADCERCUMFERENCE` varchar(255) NOT NULL,
  `AGE` varchar(11) NOT NULL,
  `SEX` varchar(9) NOT NULL,
  `BIRTHHEIGHT` varchar(4) NOT NULL,
  `CHESTCERCUMFERENCE` varchar(255) NOT NULL,
  `DIAGNOSIS` varchar(255) NOT NULL,
  `DATEADMITTED` date NOT NULL,
  `DATEDISCHARGE` date NOT NULL,
  PRIMARY KEY (`NURSERYID`),
  KEY `ADMITTINGID` (`ADMITTINGID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `tblnurserydischargesummary`
--


-- --------------------------------------------------------

--
-- Table structure for table `tblpatient`
--

CREATE TABLE IF NOT EXISTS `tblpatient` (
  `CASENUM` int(11) NOT NULL AUTO_INCREMENT,
  `FNAME` varchar(30) NOT NULL,
  `LNAME` varchar(30) NOT NULL,
  `MNAME` varchar(30) NOT NULL,
  `PADD` varchar(90) NOT NULL,
  `TELNO` varchar(30) NOT NULL,
  `GENDER` varchar(11) NOT NULL,
  `DBIRTH` date NOT NULL,
  `BIRTHPLACE` varchar(90) NOT NULL,
  `NATIONALITY` varchar(90) NOT NULL,
  `RELIGION` varchar(90) NOT NULL,
  `OCCUPATION` varchar(90) NOT NULL,
  `EMPLOYER` varchar(90) NOT NULL,
  `EMPLOYERADD` varchar(90) NOT NULL,
  `FATHER` varchar(90) NOT NULL,
  `FATHERADD` varchar(90) NOT NULL,
  `FATHERTEL` varchar(30) NOT NULL,
  `MOTHER` varchar(90) NOT NULL,
  `MOTHERADD` varchar(90) NOT NULL,
  `MOTHERTEL` varchar(30) NOT NULL,
  `SPOUSE` varchar(90) NOT NULL,
  `SPOUSEADD` varchar(90) NOT NULL,
  `SPOUSETEL` varchar(30) NOT NULL,
  `CIVILSTATUS` varchar(11) NOT NULL,
  `HOPITALIZATIONPLAN` varchar(125) NOT NULL,
  `HEALTHINSURANCE` varchar(125) NOT NULL,
  `PHIC` varchar(30) NOT NULL,
  `PHILHEALTH` tinyint(1) NOT NULL,
  `ADMITTED` tinyint(1) NOT NULL,
  PRIMARY KEY (`CASENUM`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1010119 ;

--
-- Dumping data for table `tblpatient`
--

INSERT INTO `tblpatient` (`CASENUM`, `FNAME`, `LNAME`, `MNAME`, `PADD`, `TELNO`, `GENDER`, `DBIRTH`, `BIRTHPLACE`, `NATIONALITY`, `RELIGION`, `OCCUPATION`, `EMPLOYER`, `EMPLOYERADD`, `FATHER`, `FATHERADD`, `FATHERTEL`, `MOTHER`, `MOTHERADD`, `MOTHERTEL`, `SPOUSE`, `SPOUSEADD`, `SPOUSETEL`, `CIVILSTATUS`, `HOPITALIZATIONPLAN`, `HEALTHINSURANCE`, `PHIC`, `PHILHEALTH`, `ADMITTED`) VALUES
(123, 'Jabe', 'Villaflor', 'V', 'Kabankalan City', '888-888-88', '', '2016-03-02', 'dancalan', 'sdas', 'sadas', 'asdas', '', '', 'sadsa', 'sadas', '2', 'sada', 'sad', '2', 'asdasd', 'asdasda', '2', '', '', '', '1', 0, 0),
(321, 'Janry', 'Malacapay', 'Tibus', 'Kabankalan Ciry', '', 'Male', '1998-02-09', '', '', '', '', '', '', '', '', '', '', '0', '', '0', '0', '', 'Single', '', '', '0', 0, 1),
(1234, 'Juana', 'Mololos', 'Deasis', 'Brgy. Tapi, Kabankalan City', '', 'Female', '1990-01-30', '', '', '', '', '', '', '', '', '', '', '0', '', '0', '0', '', 'Single', '', '', '1', 0, 0),
(101011, 'Jame', 'Palermo', 'Read', 'Karol an Kabankalan City', '', 'Male', '1986-02-17', '', '', '', '', '', '', '', '', '', '', '0', '', '0', '0', '', 'Merried', '', '', '1', 0, 1),
(101012, 'Racheal Ann', 'Geasin', 'Macaoling', 'Dancalan Ilog, ', '', 'Female', '1990-02-22', '', '', '', '', '', '', '', '', '', '', '0', '', '0', '0', '', 'Single', '', '', '0', 0, 1),
(101013, 'jason', 'sablaon', 'm.', 'brgy. salong', '', '', '2016-03-04', '', '', '', '', '', '', '', '', '', '', '0', '', '0', '0', '', 'Merried', 'sadasd', '', '0', 0, 0),
(101014, 'marin', 'gonzales', 'g.', 'ilog', '', 'Male', '1995-09-24', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 0),
(101015, 'Mclin john', 'Salmorin', 'G.', 'brgy, 1 ', '', 'Male', '1992-10-14', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Merried', '', '', '', 1, 0),
(101016, 'mclin', 'salmorin', 'j.', 'brgy 1', '', 'Male', '2016-03-04', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Merried', '', '', '', 1, 1),
(101017, 'ivan llyod', 'salazar', 'g', 'brgy.7 kab.city', 'dfsd', 'Male', '2016-03-04', 'wddxxcse', 'sdsad', 'sdfdsf', 'n/a', '', '', 'dqwdqw', 'ada', '2', 'sadas', 'dddw', '5', 'asdas', 'sfre', '3', 'Single', '', '', '', 1, 0),
(101018, 'paloma', 'padrigo', 's', 'kab city', '', 'Female', '1993-12-28', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 1, 0),
(101019, 'Lour Maro', 'Gonzales', 'G', 'Daan Binicuil', '', 'Male', '1991-03-31', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1),
(1010110, 'Christian', 'Palomo', 'Javier', 'Brgy. Tampalon, Kabankalan City', '', 'Male', '1994-07-19', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 0),
(1010111, 'Adrian', 'Apawan', 'A', 'Kabankalan City', '', 'Male', '1995-10-10', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1),
(1010112, 'sad', 'sad', 'sad', 'sad', '', 'Male', '1990-01-30', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Select', '', '', '', 1, 0),
(1010113, 'Earl', 'Montero', 'E', 'Sonedco, Brgy Camugao Kabankalan City', '', 'Male', '1995-06-13', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1),
(1010114, 'Marv', 'Padrigo', 'E.', 'Ilog ,Nergos occidental', '', 'Male', '2016-03-01', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 0),
(1010115, 'Maricel', 'Zayco', 'U.', 'rgy. I', '', 'Female', '1993-06-15', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1),
(1010116, 'Jayson', 'Tadeo', 'Zayco', 'Brgy. Salong, Kabankalan City', '', 'Male', '1991-05-13', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1),
(1010117, 'Reynaldo Jr.', 'Garcia', 'Lim', 'Cauayan', '', 'Male', '1994-05-09', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 0),
(1010118, 'Kevin Jake', 'Gindap', 'A.', 'Cauayan', '', 'Male', '1993-05-10', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Single', '', '', '', 0, 1);

-- --------------------------------------------------------

--
-- Table structure for table `tblprnmedication`
--

CREATE TABLE IF NOT EXISTS `tblprnmedication` (
  `PRN_MED_ID` int(11) NOT NULL AUTO_INCREMENT,
  `CASENUM` int(11) NOT NULL,
  `ADMITTINGID` int(11) NOT NULL,
  `PRNDATE` date NOT NULL,
  `PRNTIME` time NOT NULL,
  `DRUGSNAME` varchar(90) NOT NULL,
  `DOSAGE` varchar(90) NOT NULL,
  `ROUTE` varchar(90) NOT NULL,
  `REMARKS` varchar(125) NOT NULL,
  `SIGNATURE` varchar(90) NOT NULL,
  PRIMARY KEY (`PRN_MED_ID`),
  KEY `ADMITTINGID` (`ADMITTINGID`),
  KEY `CASENUM` (`CASENUM`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `tblprnmedication`
--

INSERT INTO `tblprnmedication` (`PRN_MED_ID`, `CASENUM`, `ADMITTINGID`, `PRNDATE`, `PRNTIME`, `DRUGSNAME`, `DOSAGE`, `ROUTE`, `REMARKS`, `SIGNATURE`) VALUES
(1, 321, 31, '2016-03-06', '06:51:40', 'as', 'ad', 'd', 'sad', ''),
(2, 1010117, 33, '2016-03-06', '14:48:25', 'Izosilin', '50mg', 'Every 4hours', 'N/A', '');

-- --------------------------------------------------------

--
-- Table structure for table `tblroom`
--

CREATE TABLE IF NOT EXISTS `tblroom` (
  `ROOMID` int(11) NOT NULL AUTO_INCREMENT,
  `RNAME` varchar(40) NOT NULL,
  `RBEDNUM` int(11) NOT NULL,
  `DIAGNOSIS` varchar(90) NOT NULL,
  `DOCTOR` varchar(30) NOT NULL,
  `STATION` varchar(90) NOT NULL,
  `ROOMTYPE` varchar(30) NOT NULL,
  `RPRICE` double NOT NULL,
  PRIMARY KEY (`ROOMID`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1001261 ;

--
-- Dumping data for table `tblroom`
--

INSERT INTO `tblroom` (`ROOMID`, `RNAME`, `RBEDNUM`, `DIAGNOSIS`, `DOCTOR`, `STATION`, `ROOMTYPE`, `RPRICE`) VALUES
(1001240, 'OBW-1', 8, 'Normal Deliveries', 'OB-GYNE', '1', 'Ward', 450),
(1001241, 'OB WARD-1', 8, 'NURSERY', 'OB-GYNE', '1', 'Ward', 450),
(1001242, 'OB WARD-2', 8, 'Normal Deliveries', 'OB-GYNE', '1', 'Ward', 450),
(1001243, 'OB WARD-2', 7, 'Nursery', 'OB-GYNE', '1', 'Ward', 450),
(1001244, 'SURGICAL WARD', 7, 'Post-OP', 'Surgeon', '1', 'Ward', 450),
(1001245, 'SURGICAL WARD1', 6, 'Nursery', 'Surgeon', '1', 'Ward', 450),
(1001246, 'SURGICAL WARD-2', 7, '', 'Surgeon', '1', 'Ward', 450),
(1001247, 'PEDIA WARD-1', 6, 'Misc. Cases', 'Pediatrician', '2', 'Ward', 450),
(1001248, 'PEDIA WARD-2', 7, 'Gastro Cases', 'Pediatrician', '7', 'Ward', 450),
(1001249, 'PEDIA WARD-3', 7, 'Respiratory Cases', 'Pediatrician', '2', 'Ward', 450),
(1001250, 'ISOLATION-1', 8, '', 'Internal Medicine', '2', 'Ward', 450),
(1001251, 'ISOLATION-2', 5, 'Only for male', 'Internal Medicine', '2', 'Ward', 450),
(1001252, 'ISOLATION-3', 7, 'Only for female', 'Internal Medicine', '7', 'Ward', 450),
(1001253, 'ROOM-1', 2, 'Private Rooms', '', '4', 'Private', 500),
(1001254, 'ROOM-2', 2, 'Private Rooms\n', '', '4', 'Private', 500),
(1001255, 'ROOM-3', 2, 'Private Rooms\n', '', '4', 'Private', 500),
(1001256, 'ROOM-4', 2, 'Private Rooms\n', '', '4', 'Private', 500),
(1001257, 'ROOM-5', 2, 'Private Rooms\n', '', '4', 'Private', 500),
(1001258, 'OB-PHIC', 7, '', 'OB-GYNE', '4', 'Ward', 450),
(1001259, 'OB-PHIC', 7, 'Nursery', 'OB-GYNE', '4', 'Ward', 450),
(1001260, 'PEDIA-PHIC', 7, '', 'Pediatrician', '4', 'Ward', 450);

-- --------------------------------------------------------

--
-- Table structure for table `tbltransfuseon`
--

CREATE TABLE IF NOT EXISTS `tbltransfuseon` (
  `FUSEONID` int(11) NOT NULL AUTO_INCREMENT,
  `MEDICATIONID` int(11) NOT NULL,
  `FUSEONDATE` datetime NOT NULL,
  `FUSEONDESC` varchar(125) NOT NULL,
  PRIMARY KEY (`FUSEONID`),
  KEY `MEDICATIONID` (`MEDICATIONID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
