├── js ├── user.js ├── showpersonaldata.js ├── menu.js ├── patient.js ├── medicalrecord.js ├── addmedicalreport.js ├── showbudget.js ├── showpayment.js ├── showbudgetreport.js ├── showpaymentreport.js ├── console.js ├── userslist.js ├── patientslist.js ├── adddiagnosis.js ├── loaduser.js ├── loadpatient.js ├── feereport.js ├── stateuser.js ├── appointmentreport.js ├── statepatient.js ├── paymentreport.js ├── stateappointment.js ├── activatebudget.js ├── consultbank.js ├── consultpaymenttype.js ├── consultproceduretype.js ├── index.js ├── consultspecialty.js ├── consultlocation.js ├── consultsubprocedure.js ├── addbank.js ├── modifypassword.js ├── addhistory.js ├── addspecialty.js ├── addprocedure.js ├── addlocation.js ├── addpaymenttype.js ├── modifybudget.js ├── addsubprocedure.js ├── addpayment.js ├── addproceduretype.js ├── addbudget.js ├── consultprocedure.js ├── addpatient.js ├── modifypayment.js ├── modifypatient.js ├── updatebudget.js ├── modifyuser.js ├── adduser.js ├── adddevelopment.js ├── addappointment.js └── modifybank.js ├── images ├── asc.gif ├── bg.gif ├── desc.gif ├── edit.png ├── empty.png ├── icon.png ├── logo.png ├── look.png ├── user.png ├── favicon.ico ├── loader.gif ├── reload.png ├── success.png ├── warning.png ├── warning2.png ├── separator.png ├── construction.png ├── odontogram │ ├── bb.png │ ├── bg.png │ ├── bk.png │ ├── bl.png │ ├── bo.png │ ├── bp.png │ ├── br.png │ ├── cb.png │ ├── cg.png │ ├── cl.png │ ├── co.png │ ├── cp.png │ ├── cr.png │ ├── di.png │ ├── ib.png │ ├── ig.png │ ├── il.png │ ├── io.png │ ├── ip.png │ ├── ir.png │ ├── ix.png │ ├── lb.png │ ├── lg.png │ ├── ll.png │ ├── lo.png │ ├── lp.png │ ├── lr.png │ ├── n.png │ ├── pe.png │ ├── pr.png │ ├── rb.png │ ├── rg.png │ ├── rl.png │ ├── ro.png │ ├── rp.png │ ├── rr.png │ ├── se.png │ ├── sl.png │ ├── sn.png │ ├── tb.png │ ├── tg.png │ ├── tl.png │ ├── to.png │ ├── tp.png │ ├── tr.png │ ├── x.png │ ├── icl.png │ ├── idi.png │ ├── ipe.png │ ├── ipr.png │ ├── ise.png │ ├── isl.png │ ├── isn.png │ ├── tooth.png │ └── separator.png ├── logobackground.png ├── message_background.png └── warning_background.png ├── userslist.php ├── patientslist.php ├── sql └── sonri-citas.sql ├── modules ├── dbhandler.php ├── functions.php ├── checkbank.php ├── checkspecialty.php ├── checklocation.php ├── checkuserbyid.php ├── checkpaymenttype.php ├── checkprocedure.php ├── checkproceduretype.php ├── checksubprocedure.php ├── checkdevelopmentdata.php ├── checkuserlogin.php ├── modifyuserstate.php ├── modifypatientstate.php ├── modifypassword.php ├── checkuser.php ├── checkpatient.php ├── checkodontogramdata.php ├── getbankdata.php ├── getpaymenttypedata.php ├── getlocationdata.php ├── getproceduretypedata.php ├── getspecialtydata.php ├── checkbankdata.php ├── checkpaymenttypedata.php ├── checkproceduretypedata.php ├── addbank.php ├── addpaymenttype.php ├── addproceduretype.php ├── modifybank.php ├── getproceduredata.php ├── getsubproceduredata.php ├── modifyappointmentstatus.php ├── modifypaymenttype.php ├── modifyproceduretype.php ├── addspecialty.php ├── modifylocation.php ├── modifyspecialty.php ├── addlocation.php ├── checkappointmentreportdata.php ├── startsession.php ├── modifyprocedure.php ├── modifysubprocedure.php ├── checkspecialtydata.php ├── showschedule.php ├── addprocedure.php ├── addsubprocedure.php ├── updatebudgetevolve.php ├── checkupdatebudgetevolvedata.php ├── checklocationdata.php ├── modifyappointment.php ├── adddevelopment.php ├── modifypayment.php ├── checkpassworddata.php ├── getpatientdata.php ├── addpayment.php ├── getuserdata.php ├── addappointment.php ├── checkpaymentdata.php ├── activatebudget.php ├── getappointmentreportdata.php ├── checkbudgetdata.php ├── getpaymentreport.php ├── modifyhistory.php ├── checkpaymentreportdata.php ├── checkfeereportdata.php ├── checkproceduredata.php ├── checksubproceduredata.php ├── addodontogram.php ├── showdentistday.php ├── addbudget.php ├── getodontogram.php ├── getfeereport.php ├── getuserslist.php ├── getpatientslist.php ├── addhistory.php ├── modifybudgetinfo.php ├── gethistory.php ├── modifyuser.php ├── modifypatient.php └── checkpatientdata.php ├── css ├── images │ ├── ui-icons_2694e8_256x240.png │ ├── ui-icons_2e83ff_256x240.png │ ├── ui-icons_3d80b3_256x240.png │ ├── ui-icons_72a7cf_256x240.png │ ├── ui-icons_ffffff_256x240.png │ ├── ui-bg_flat_15_cd0a0a_40x100.png │ ├── ui-bg_glass_100_e4f1fb_1x400.png │ ├── ui-bg_glass_50_3baae3_1x400.png │ ├── ui-bg_glass_80_d7ebf9_1x400.png │ ├── ui-bg_highlight-hard_70_000000_1x100.png │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png │ └── ui-bg_highlight-soft_100_deedf7_1x100.png ├── tablesorter.css └── reset.css ├── includes ├── jquery.php └── styles.php ├── .gitattributes ├── .gitignore ├── denied.php ├── logout.php ├── error.php ├── index.php ├── test.php ├── console.php ├── addbank.php ├── addpaymenttype.php ├── addproceduretype.php ├── addspecialty.php ├── addlocation.php ├── appointmentreport.php ├── paymentreport.php ├── feereport.php ├── loadpatient.php └── README.md /js/user.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('.tablesorter').tablesorter(); 3 | }); -------------------------------------------------------------------------------- /images/asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/asc.gif -------------------------------------------------------------------------------- /images/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/bg.gif -------------------------------------------------------------------------------- /userslist.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/userslist.php -------------------------------------------------------------------------------- /images/desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/desc.gif -------------------------------------------------------------------------------- /images/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/edit.png -------------------------------------------------------------------------------- /images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/empty.png -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/icon.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/look.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/look.png -------------------------------------------------------------------------------- /images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/user.png -------------------------------------------------------------------------------- /patientslist.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/patientslist.php -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/favicon.ico -------------------------------------------------------------------------------- /images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/loader.gif -------------------------------------------------------------------------------- /images/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/reload.png -------------------------------------------------------------------------------- /images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/success.png -------------------------------------------------------------------------------- /images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/warning.png -------------------------------------------------------------------------------- /images/warning2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/warning2.png -------------------------------------------------------------------------------- /sql/sonri-citas.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/sql/sonri-citas.sql -------------------------------------------------------------------------------- /images/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/separator.png -------------------------------------------------------------------------------- /modules/dbhandler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/modules/dbhandler.php -------------------------------------------------------------------------------- /modules/functions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/modules/functions.php -------------------------------------------------------------------------------- /images/construction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/construction.png -------------------------------------------------------------------------------- /images/odontogram/bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bb.png -------------------------------------------------------------------------------- /images/odontogram/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bg.png -------------------------------------------------------------------------------- /images/odontogram/bk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bk.png -------------------------------------------------------------------------------- /images/odontogram/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bl.png -------------------------------------------------------------------------------- /images/odontogram/bo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bo.png -------------------------------------------------------------------------------- /images/odontogram/bp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/bp.png -------------------------------------------------------------------------------- /images/odontogram/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/br.png -------------------------------------------------------------------------------- /images/odontogram/cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/cb.png -------------------------------------------------------------------------------- /images/odontogram/cg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/cg.png -------------------------------------------------------------------------------- /images/odontogram/cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/cl.png -------------------------------------------------------------------------------- /images/odontogram/co.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/co.png -------------------------------------------------------------------------------- /images/odontogram/cp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/cp.png -------------------------------------------------------------------------------- /images/odontogram/cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/cr.png -------------------------------------------------------------------------------- /images/odontogram/di.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/di.png -------------------------------------------------------------------------------- /images/odontogram/ib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ib.png -------------------------------------------------------------------------------- /images/odontogram/ig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ig.png -------------------------------------------------------------------------------- /images/odontogram/il.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/il.png -------------------------------------------------------------------------------- /images/odontogram/io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/io.png -------------------------------------------------------------------------------- /images/odontogram/ip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ip.png -------------------------------------------------------------------------------- /images/odontogram/ir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ir.png -------------------------------------------------------------------------------- /images/odontogram/ix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ix.png -------------------------------------------------------------------------------- /images/odontogram/lb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/lb.png -------------------------------------------------------------------------------- /images/odontogram/lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/lg.png -------------------------------------------------------------------------------- /images/odontogram/ll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ll.png -------------------------------------------------------------------------------- /images/odontogram/lo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/lo.png -------------------------------------------------------------------------------- /images/odontogram/lp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/lp.png -------------------------------------------------------------------------------- /images/odontogram/lr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/lr.png -------------------------------------------------------------------------------- /images/odontogram/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/n.png -------------------------------------------------------------------------------- /images/odontogram/pe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/pe.png -------------------------------------------------------------------------------- /images/odontogram/pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/pr.png -------------------------------------------------------------------------------- /images/odontogram/rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/rb.png -------------------------------------------------------------------------------- /images/odontogram/rg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/rg.png -------------------------------------------------------------------------------- /images/odontogram/rl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/rl.png -------------------------------------------------------------------------------- /images/odontogram/ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ro.png -------------------------------------------------------------------------------- /images/odontogram/rp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/rp.png -------------------------------------------------------------------------------- /images/odontogram/rr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/rr.png -------------------------------------------------------------------------------- /images/odontogram/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/se.png -------------------------------------------------------------------------------- /images/odontogram/sl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/sl.png -------------------------------------------------------------------------------- /images/odontogram/sn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/sn.png -------------------------------------------------------------------------------- /images/odontogram/tb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tb.png -------------------------------------------------------------------------------- /images/odontogram/tg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tg.png -------------------------------------------------------------------------------- /images/odontogram/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tl.png -------------------------------------------------------------------------------- /images/odontogram/to.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/to.png -------------------------------------------------------------------------------- /images/odontogram/tp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tp.png -------------------------------------------------------------------------------- /images/odontogram/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tr.png -------------------------------------------------------------------------------- /images/odontogram/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/x.png -------------------------------------------------------------------------------- /js/showpersonaldata.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:text').attr('readonly','readonly'); 3 | }); -------------------------------------------------------------------------------- /images/logobackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/logobackground.png -------------------------------------------------------------------------------- /images/odontogram/icl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/icl.png -------------------------------------------------------------------------------- /images/odontogram/idi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/idi.png -------------------------------------------------------------------------------- /images/odontogram/ipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ipe.png -------------------------------------------------------------------------------- /images/odontogram/ipr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ipr.png -------------------------------------------------------------------------------- /images/odontogram/ise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/ise.png -------------------------------------------------------------------------------- /images/odontogram/isl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/isl.png -------------------------------------------------------------------------------- /images/odontogram/isn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/isn.png -------------------------------------------------------------------------------- /images/message_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/message_background.png -------------------------------------------------------------------------------- /images/odontogram/tooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/tooth.png -------------------------------------------------------------------------------- /images/warning_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/warning_background.png -------------------------------------------------------------------------------- /images/odontogram/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/images/odontogram/separator.png -------------------------------------------------------------------------------- /js/menu.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('.accordion').accordion({collapsible:true,autoHeight:false,navigation:true}); 3 | }); -------------------------------------------------------------------------------- /js/patient.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('table').tablesorter(); 3 | $('a[rel="external"]').attr('target','_blank'); 4 | }); -------------------------------------------------------------------------------- /css/images/ui-icons_2694e8_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-icons_2694e8_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_3d80b3_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-icons_3d80b3_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_72a7cf_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-icons_72a7cf_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /js/medicalrecord.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('.accordion').accordion({collapsible:true,autoHeight:false,navigation:true}); 3 | }); -------------------------------------------------------------------------------- /js/addmedicalreport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | alert('todo bien'); 4 | }); 5 | }); -------------------------------------------------------------------------------- /css/images/ui-bg_flat_15_cd0a0a_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_flat_15_cd0a0a_40x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_100_e4f1fb_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_glass_100_e4f1fb_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_50_3baae3_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_glass_50_3baae3_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_80_d7ebf9_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_glass_80_d7ebf9_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-hard_70_000000_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_highlight-hard_70_000000_1x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_highlight-soft_25_ffef8f_1x100.png -------------------------------------------------------------------------------- /js/showbudget.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | window.print(); 5 | }); 6 | }); -------------------------------------------------------------------------------- /js/showpayment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | window.print(); 5 | }); 6 | }); -------------------------------------------------------------------------------- /css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-soft_100_deedf7_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andresbejarano/DentalRegistry/HEAD/css/images/ui-bg_highlight-soft_100_deedf7_1x100.png -------------------------------------------------------------------------------- /js/showbudgetreport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | window.print(); 5 | }); 6 | }); -------------------------------------------------------------------------------- /js/showpaymentreport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | window.print(); 5 | }); 6 | }); -------------------------------------------------------------------------------- /includes/jquery.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /modules/checkbank.php: -------------------------------------------------------------------------------- 1 | existBank($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checkspecialty.php: -------------------------------------------------------------------------------- 1 | existSpecialty($_POST['id']); 7 | echo $state; 8 | ?> -------------------------------------------------------------------------------- /modules/checklocation.php: -------------------------------------------------------------------------------- 1 | existLocation($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checkuserbyid.php: -------------------------------------------------------------------------------- 1 | checkUserById($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checkpaymenttype.php: -------------------------------------------------------------------------------- 1 | existPaymenttype($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checkprocedure.php: -------------------------------------------------------------------------------- 1 | existProcedure($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checkproceduretype.php: -------------------------------------------------------------------------------- 1 | existProceduretype($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /modules/checksubprocedure.php: -------------------------------------------------------------------------------- 1 | existSubprocedure($_POST['id']); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /includes/styles.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /modules/checkdevelopmentdata.php: -------------------------------------------------------------------------------- 1 | 2000){ 4 | if($success) $success = false; 5 | echo '

- La descripción ingresada no debe superar las 2000 letras

'; 6 | } 7 | if($success) echo $success; 8 | ?> -------------------------------------------------------------------------------- /modules/checkuserlogin.php: -------------------------------------------------------------------------------- 1 | checkUserLogin(trim($_POST['username']),trim($_POST['password'])); 7 | } 8 | echo $state; 9 | ?> -------------------------------------------------------------------------------- /js/console.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | alert($formdata); 7 | }); 8 | }); -------------------------------------------------------------------------------- /modules/modifyuserstate.php: -------------------------------------------------------------------------------- 1 | executeQuery($update); 12 | echo $success; 13 | ?> -------------------------------------------------------------------------------- /modules/modifypatientstate.php: -------------------------------------------------------------------------------- 1 | executeQuery($update); 8 | if($success) echo $success; 9 | else echo $update; 10 | ?> -------------------------------------------------------------------------------- /modules/modifypassword.php: -------------------------------------------------------------------------------- 1 | executeQuery($update); 8 | if($success) echo $success; 9 | else echo $update; 10 | ?> -------------------------------------------------------------------------------- /modules/checkuser.php: -------------------------------------------------------------------------------- 1 | checkUser($_POST['documenttype'],$number); 11 | } 12 | echo $state; 13 | ?> -------------------------------------------------------------------------------- /modules/checkpatient.php: -------------------------------------------------------------------------------- 1 | checkPatient($_POST['documenttype'],$number); 11 | } 12 | echo $state; 13 | ?> -------------------------------------------------------------------------------- /modules/checkodontogramdata.php: -------------------------------------------------------------------------------- 1 | 2000){ 8 | if($success) $success = false; 9 | echo '

La descripción debe ser menor de 2000 caracteres

'; 10 | } 11 | 12 | if($success) echo $success; 13 | ?> -------------------------------------------------------------------------------- /modules/getbankdata.php: -------------------------------------------------------------------------------- 1 | getBankData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'name' => $data['name'], 14 | 'description' => $data['description'] 15 | ); 16 | } 17 | echo json_encode($array); 18 | ?> -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /modules/getpaymenttypedata.php: -------------------------------------------------------------------------------- 1 | getPaymenttypeData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'name' => $data['name'], 14 | 'description' => $data['description'] 15 | ); 16 | } 17 | echo json_encode($array); 18 | ?> -------------------------------------------------------------------------------- /modules/getlocationdata.php: -------------------------------------------------------------------------------- 1 | getLocationData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'code' => $data['code'], 14 | 'name' => $data['name'], 15 | 'description' => $data['description'] 16 | ); 17 | } 18 | echo json_encode($array); 19 | ?> -------------------------------------------------------------------------------- /modules/getproceduretypedata.php: -------------------------------------------------------------------------------- 1 | getProceduretypeData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'name' => $data['name'], 14 | 'description' => $data['description'] 15 | ); 16 | } 17 | echo json_encode($array); 18 | ?> -------------------------------------------------------------------------------- /modules/getspecialtydata.php: -------------------------------------------------------------------------------- 1 | getSpecialtyData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'name' => $data['name'], 14 | 'fee' => $data['fee'], 15 | 'description' => $data['description'] 16 | ); 17 | } 18 | echo json_encode($array); 19 | ?> -------------------------------------------------------------------------------- /js/userslist.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | $('#loader').show(); 5 | $('#users').slideUp(1000,function(){ 6 | var $formdata = $('form').serialize(); 7 | $.post('modules/getuserslist.php',$formdata,function(data){ 8 | $('#users').html(data); 9 | $('table').tablesorter(); 10 | $('#users').slideDown(1000,function(){ 11 | $('input:button').show(); 12 | $('#loader').hide(); 13 | }); 14 | }); 15 | }); 16 | }); 17 | }); -------------------------------------------------------------------------------- /js/patientslist.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:button').button().click(function(){ 3 | $('input:button').hide(); 4 | $('#loader').show(); 5 | $('#patients').slideUp(1000,function(){ 6 | var $formdata = $('form').serialize(); 7 | $.post('modules/getpatientslist.php',$formdata,function(data){ 8 | $('#patients').html(data); 9 | $('table').tablesorter(); 10 | $('#patients').slideDown(1000,function(){ 11 | $('input:button').show(); 12 | $('#loader').hide(); 13 | }); 14 | }); 15 | }); 16 | }); 17 | }); -------------------------------------------------------------------------------- /js/adddiagnosis.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:text[name=patient]').attr('readonly','readonly'); 3 | $('input:text[name=user]').attr('readonly','readonly'); 4 | $('input:text[name=username]').attr('readonly','readonly'); 5 | $('input:text[name=date]').attr('readonly','readonly'); 6 | var $message = $('#message'); 7 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 8 | $('input:button').button().click(function(){ 9 | var $formdata = $('form').serialize(); 10 | alert($formdata); 11 | }); 12 | }); -------------------------------------------------------------------------------- /modules/checkbankdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el nombre

"; 10 | } 11 | 12 | //La descripcion debe ser menor de 300 caracteres 13 | if(strlen(trim($_POST['description'])) > 300){ 14 | if($success) $success = false; 15 | echo '

La descripción debe ser menor de 300 caracteres

'; 16 | } 17 | 18 | if($success) echo $success; 19 | ?> -------------------------------------------------------------------------------- /modules/checkpaymenttypedata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el nombre

"; 10 | } 11 | 12 | //La descripcion debe ser menor de 300 caracteres 13 | if(strlen(trim($_POST['description'])) > 300){ 14 | if($success) $success = false; 15 | echo '

La descripción debe ser menor de 300 caracteres

'; 16 | } 17 | 18 | if($success) echo $success; 19 | ?> -------------------------------------------------------------------------------- /modules/checkproceduretypedata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el nombre

"; 10 | } 11 | 12 | //La descripcion debe ser menor de 300 caracteres 13 | if(strlen(trim($_POST['description'])) > 300){ 14 | if($success) $success = false; 15 | echo '

La descripción debe ser menor de 300 caracteres

'; 16 | } 17 | 18 | if($success) echo $success; 19 | ?> -------------------------------------------------------------------------------- /modules/addbank.php: -------------------------------------------------------------------------------- 1 | 0){ 16 | $insert .= ',`description`'; 17 | $values .= ',"' . $description . '"'; 18 | } 19 | 20 | $query = $insert . ') ' . $values . ')'; 21 | $success = $Handler->executeQuery($query); 22 | 23 | echo $success; 24 | ?> -------------------------------------------------------------------------------- /modules/addpaymenttype.php: -------------------------------------------------------------------------------- 1 | 0){ 16 | $insert .= ',`description`'; 17 | $values .= ',"' . $description . '"'; 18 | } 19 | 20 | $query = $insert . ') ' . $values . ')'; 21 | $success = $Handler->executeQuery($query); 22 | 23 | echo $success; 24 | ?> -------------------------------------------------------------------------------- /modules/addproceduretype.php: -------------------------------------------------------------------------------- 1 | 0){ 16 | $insert .= ',`description`'; 17 | $values .= ',"' . $description . '"'; 18 | } 19 | 20 | $query = $insert . ') ' . $values . ')'; 21 | $success = $Handler->executeQuery($query); 22 | 23 | echo $success; 24 | ?> -------------------------------------------------------------------------------- /modules/modifybank.php: -------------------------------------------------------------------------------- 1 | 0){ 14 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 15 | } 16 | else{ 17 | $update .= ',`description` = NULL'; 18 | } 19 | 20 | $update .= ' WHERE id = ' . $_POST['id']; 21 | 22 | $success = $Handler->executeQuery($update); 23 | 24 | echo $success; 25 | ?> -------------------------------------------------------------------------------- /modules/getproceduredata.php: -------------------------------------------------------------------------------- 1 | getProcedureData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'code' => $data['code'], 14 | 'name' => $data['name'], 15 | 'price' => $data['price'], 16 | 'active' => $data['active'], 17 | 'proceduretype' => $data['proceduretype'], 18 | 'description' => $data['description'] 19 | ); 20 | } 21 | echo json_encode($array); 22 | ?> -------------------------------------------------------------------------------- /modules/getsubproceduredata.php: -------------------------------------------------------------------------------- 1 | getSubprocedureData($_POST['id']); 9 | } 10 | if($data != null){ 11 | $array = array( 12 | 'id' => $data['id'], 13 | 'code' => $data['code'], 14 | 'name' => $data['name'], 15 | 'price' => $data['price'], 16 | 'active' => $data['active'], 17 | 'procedure' => $data['procedure'], 18 | 'description' => $data['description'] 19 | ); 20 | } 21 | echo json_encode($array); 22 | ?> -------------------------------------------------------------------------------- /modules/modifyappointmentstatus.php: -------------------------------------------------------------------------------- 1 | Las citas canceladas no pueden ser reprogramadas

'; 6 | echo '

Vuelva a crear la cita en la opción de Agendar Citas

'; 7 | } 8 | else{ 9 | $update = 'UPDATE `dental`.`appointment` SET '; 10 | $update .= '`status` = ' . $_POST['status']; 11 | $update .= ' WHERE `id` = ' . $_POST['id']; 12 | $success = $handler->executeQuery($update); 13 | if($success) echo $success; 14 | else echo $update; 15 | } 16 | ?> -------------------------------------------------------------------------------- /modules/modifypaymenttype.php: -------------------------------------------------------------------------------- 1 | 0){ 14 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 15 | } 16 | else{ 17 | $update .= ',`description` = NULL'; 18 | } 19 | 20 | $update .= ' WHERE id = ' . $_POST['id']; 21 | 22 | $success = $Handler->executeQuery($update); 23 | 24 | echo $success; 25 | ?> -------------------------------------------------------------------------------- /modules/modifyproceduretype.php: -------------------------------------------------------------------------------- 1 | 0){ 14 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 15 | } 16 | else{ 17 | $update .= ',`description` = NULL'; 18 | } 19 | 20 | $update .= ' WHERE id = ' . $_POST['id']; 21 | 22 | $success = $Handler->executeQuery($update); 23 | 24 | echo $success; 25 | ?> -------------------------------------------------------------------------------- /modules/addspecialty.php: -------------------------------------------------------------------------------- 1 | 0){ 19 | $insert .= ',`description`'; 20 | $values .= ',' . '"' . trim($_POST['description']) . '"'; 21 | } 22 | 23 | $query = $insert . ') ' . $values . ')'; 24 | $success = $Handler->executeQuery($query); 25 | 26 | echo $success; 27 | ?> -------------------------------------------------------------------------------- /modules/modifylocation.php: -------------------------------------------------------------------------------- 1 | 0){ 10 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 11 | } 12 | else{ 13 | $update .= ',`description` = NULL'; 14 | } 15 | 16 | $update .= ' WHERE id = ' . $_POST['id']; 17 | $handler = new DBHandler(); 18 | $success = $handler->executeQuery($update); 19 | if($success) 20 | echo $success; 21 | else 22 | echo $update; 23 | ?> -------------------------------------------------------------------------------- /modules/modifyspecialty.php: -------------------------------------------------------------------------------- 1 | 0){ 17 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 18 | } 19 | else{ 20 | $update .= ',`description` = NULL'; 21 | } 22 | 23 | $update .= ' WHERE id = ' . $_POST['id']; 24 | 25 | $success = $Handler->executeQuery($update); 26 | 27 | echo $success; 28 | ?> -------------------------------------------------------------------------------- /modules/addlocation.php: -------------------------------------------------------------------------------- 1 | 0){ 18 | $insert .= ',`description`'; 19 | $values .= ',"' . $description . '"'; 20 | } 21 | 22 | $query = $insert . ') ' . $values . ')'; 23 | $handler = new DBHandler(); 24 | $success = $handler->executeQuery($query); 25 | if($success) 26 | echo $success; 27 | else 28 | echo $query; 29 | ?> -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /modules/checkappointmentreportdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar la fecha de la cita

'; 11 | } 12 | else{ 13 | $array = splitDate($date); 14 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 15 | if($success) $success = false; 16 | echo '

Formato inválido de la fecha de la cita

'; 17 | } 18 | else{ 19 | if(!checkdate($array[0],$array[1],$array[2])){ 20 | if($success) $success = false; 21 | echo '

La fecha ingresada no existe

'; 22 | } 23 | } 24 | } 25 | if($success) echo $success; 26 | ?> -------------------------------------------------------------------------------- /modules/startsession.php: -------------------------------------------------------------------------------- 1 | getUserLoginData(trim($_POST['username']),trim($_POST['password'])); 7 | if($data != null){ 8 | $_SESSION['username'] = $_POST['username']; 9 | $_SESSION['id'] = $data['id']; 10 | $_SESSION['firstname'] = $data['firstname']; 11 | $_SESSION['middlename'] = $data['middlename']; 12 | $_SESSION['firstlastname'] = $data['firstlastname']; 13 | $_SESSION['secondlastname'] = $data['secondlastname']; 14 | $_SESSION['name'] = $data['firstname'] . ' ' . $data['firstlastname'] . ' ' . $data['secondlastname']; 15 | $_SESSION['sex'] = $data['sex']; 16 | $_SESSION['privileges'] = $data['privileges']; 17 | } 18 | } 19 | ?> -------------------------------------------------------------------------------- /modules/modifyprocedure.php: -------------------------------------------------------------------------------- 1 | 0){ 21 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 22 | } 23 | else{ 24 | $update .= ',`description` = NULL'; 25 | } 26 | 27 | $update .= ' WHERE id = ' . $_POST['id']; 28 | $handler = new DBHandler(); 29 | $success = $handler->executeQuery($update); 30 | if($success) 31 | echo $success; 32 | else 33 | echo $update; 34 | ?> -------------------------------------------------------------------------------- /modules/modifysubprocedure.php: -------------------------------------------------------------------------------- 1 | 0){ 21 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 22 | } 23 | else{ 24 | $update .= ',`description` = NULL'; 25 | } 26 | 27 | $update .= ' WHERE id = ' . $_POST['id']; 28 | $handler = new DBHandler(); 29 | $success = $handler->executeQuery($update); 30 | if($success) 31 | echo $success; 32 | else 33 | echo $update; 34 | ?> -------------------------------------------------------------------------------- /modules/checkspecialtydata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el nombre

"; 10 | } 11 | 12 | //El honorario es obligatorio y debe ser numerico 13 | $fee = trim($_POST['fee']); 14 | if(strlen($fee) < 1){ 15 | if($success) $success = false; 16 | echo "

Debe ingresar el valor del honorario

"; 17 | } 18 | else{ 19 | if(!is_numeric($fee)){ 20 | if($success) $success = false; 21 | echo "

Valor del honorario inválido

"; 22 | } 23 | } 24 | 25 | //La descripcion debe ser menor de 300 caracteres 26 | if(strlen(trim($_POST['description'])) > 300){ 27 | if($success) $success = false; 28 | echo "

La descripción debe ser menor de 300 caracteres

"; 29 | } 30 | 31 | if($success) echo $success; 32 | ?> -------------------------------------------------------------------------------- /modules/showschedule.php: -------------------------------------------------------------------------------- 1 | getSchedule($_POST['dentist'],$date); 7 | if($schedule != null){ 8 | $time = mktime(0,0,0,$array[0],$array[1],$array[2]); 9 | $day = strtolower(date('l',$time)); 10 | if($schedule[$day] == true){ 11 | $hour = $init = $schedule[$day . 'init']; 12 | $end = $schedule[$day . 'end']; 13 | 14 | for($i = 0;$i <= ($end - $init);$i += 1){ 15 | $table[$i][0] = $handler->getHour($hour); 16 | $hour += 1; 17 | } 18 | 19 | $appointmentcount = $handler->getAppointmentCount($date); 20 | } 21 | else{ 22 | echo '

El dentista no atiende el día solicitado

'; 23 | } 24 | } 25 | else{ 26 | echo '

El dentista no tiene horario programado para la fecha solicitada

'; 27 | } 28 | ?> -------------------------------------------------------------------------------- /modules/addprocedure.php: -------------------------------------------------------------------------------- 1 | 0){ 28 | $insert .= ',`description`'; 29 | $values .= ',"' . $description . '"'; 30 | } 31 | 32 | $query = $insert . ') ' . $values . ')'; 33 | $success = $Handler->executeQuery($query); 34 | if($success) 35 | echo $success; 36 | else 37 | echo $query; 38 | ?> -------------------------------------------------------------------------------- /modules/addsubprocedure.php: -------------------------------------------------------------------------------- 1 | 0){ 28 | $insert .= ',`description`'; 29 | $values .= ',"' . $description . '"'; 30 | } 31 | 32 | $query = $insert . ') ' . $values . ')'; 33 | $success = $Handler->executeQuery($query); 34 | if($success) 35 | echo $success; 36 | else 37 | echo $query; 38 | ?> -------------------------------------------------------------------------------- /modules/updatebudgetevolve.php: -------------------------------------------------------------------------------- 1 | getBudgetEvolveCount($_POST['id']); 8 | if($count > 0){ 9 | for($i = 0;$i < $count;$i += 1){ 10 | if(isset($_POST['done' . ($i + 1)]) && $_POST['done' . ($i + 1)] == 1){ 11 | $query = 'UPDATE `dental`.`budgetevolve` SET '; 12 | $query .= '`done` = TRUE'; 13 | $query .= ',`user` = ' . $_POST['user' . ($i + 1)] . ''; 14 | $date = splitDate(trim($_POST['date' . ($i + 1)])); 15 | $query .= ',`date` = "' . $date[2] . '-' . $date[0] . '-' . $date[1] . '"'; 16 | $query .= ',`description` = "' . trim($_POST['description' . ($i + 1)]) . '"'; 17 | $query .= ' WHERE `id` = ' . $_POST['id' . ($i + 1)] . ''; 18 | $success = $handler->executeQuery($query); 19 | if(!$success){ 20 | $def = false; 21 | echo $query; 22 | } 23 | } 24 | } 25 | echo $def; 26 | } 27 | ?> -------------------------------------------------------------------------------- /js/loaduser.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkuser.php',$formdata,function(value){ 9 | if(value == '-1'){ 10 | $message.html('Los datos ingresados no corresponden a ningún usuario'); 11 | $message.dialog({ 12 | title:'warning Registro inválido', 13 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 14 | }); 15 | $message.dialog('open'); 16 | } 17 | else{ 18 | $.post('modules/getuserdata.php',$formdata,function(data){ 19 | window.location = 'user.php?id=' + data.id; 20 | },'json'); 21 | } 22 | $('input:button').show(); 23 | $('#loader').hide(); 24 | }); 25 | }); 26 | }); -------------------------------------------------------------------------------- /js/loadpatient.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkpatient.php',$formdata,function(value){ 9 | if(value == '-1'){ 10 | $message.html('Los datos ingresados no corresponden a ningún paciente'); 11 | $message.dialog({ 12 | title:'warning Registro inválido', 13 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 14 | }); 15 | $message.dialog('open'); 16 | } 17 | else{ 18 | $.post('modules/getpatientdata.php',$formdata,function(data){ 19 | window.location = 'patient.php?id=' + data.id; 20 | },'json'); 21 | } 22 | $('input:button').show(); 23 | $('#loader').hide(); 24 | }); 25 | }); 26 | }); -------------------------------------------------------------------------------- /modules/checkupdatebudgetevolvedata.php: -------------------------------------------------------------------------------- 1 | getBudgetEvolveCount($_POST['id']); 7 | if($count > 0){ 8 | for($i = 0;$i < $count;$i += 1){ 9 | if(isset($_POST['done' . ($i + 1)]) && $_POST['done' . ($i + 1)] == 1){ 10 | if($_POST['user' . ($i + 1)] == 0){ 11 | if($success) $success = false; 12 | echo '

- Debe ingresar el dentista en el procedimiento ' . $_POST['id' . ($i + 1)] . '

'; 13 | } 14 | if($_POST['date' . ($i + 1)] == ''){ 15 | if($success) $success = false; 16 | echo '

- Debe ingresar la fecha de finalización en el procedimiento ' . $_POST['id' . ($i + 1)] . '

'; 17 | } 18 | if(strlen(trim($_POST['description' . ($i + 1)])) > 2000){ 19 | if($success) $success = false; 20 | echo '

- La longitud de la descripción en el procedimiento ' . $_POST['id' . ($i + 1)] . ' no debe superar las 2000 letras

'; 21 | } 22 | } 23 | } 24 | } 25 | if($success) echo $success; 26 | ?> -------------------------------------------------------------------------------- /modules/checklocationdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el código

"; 10 | } 11 | else{ 12 | $handler = new DBHandler(); 13 | $id = $handler->getLocationId($code); 14 | if(isset($_POST['id'])){//Se esta modificando el procedimiento 15 | if($id != 0 && $id != $_POST['id']){ 16 | $success = false; 17 | echo '

Ya se encuentra registrado el código

'; 18 | } 19 | } 20 | else{//Se esta agregando el procedimiento 21 | if($id != 0){ 22 | if($success) $success = false; 23 | echo '

Ya se encuentra registrado el código

'; 24 | } 25 | } 26 | } 27 | 28 | //La descripcion debe ser menor de 2000 caracteres 29 | if(strlen(trim($_POST['description'])) > 2000){ 30 | if($success) $success = false; 31 | echo '

La descripción debe ser menor de 2000 caracteres

'; 32 | } 33 | 34 | if($success) echo $success; 35 | ?> -------------------------------------------------------------------------------- /modules/modifyappointment.php: -------------------------------------------------------------------------------- 1 | 0){ 26 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 27 | } 28 | else{ 29 | $update .= ',`description` = NULL'; 30 | } 31 | 32 | $update .= ' WHERE `id` = ' . $_POST['id']; 33 | $handler = new DBHandler(); 34 | $success = $handler->executeQuery($update); 35 | if($success) echo $success; 36 | else echo $update; 37 | ?> -------------------------------------------------------------------------------- /modules/adddevelopment.php: -------------------------------------------------------------------------------- 1 | executeQuery($query); 42 | if($success) echo $success; 43 | else echo $query; 44 | ?> -------------------------------------------------------------------------------- /js/feereport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#dateinit,#dateend').datepicker(); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | var $formdata = $('form').serialize(); 9 | $('#data').slideUp(1000,function(){ 10 | $.post('modules/checkfeereportdata.php',$formdata,function(value){ 11 | if(value == '1'){ 12 | $.post('modules/getfeereport.php',$formdata,function(data){ 13 | $('#data').html(data).slideDown(1000,function(){ 14 | $('input:button').show(); 15 | $('#loader').hide(); 16 | }); 17 | $('table').tablesorter(); 18 | }); 19 | } 20 | else{ 21 | $message.html(value); 22 | $message.dialog({ 23 | title:'warning Error en los datos ingresados', 24 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 25 | }); 26 | $message.dialog('open'); 27 | $('input:button').show(); 28 | $('#loader').hide(); 29 | } 30 | }); 31 | }); 32 | }); 33 | }); -------------------------------------------------------------------------------- /js/stateuser.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('#loader').show(); 7 | $('input:button').hide(); 8 | $.post('modules/modifyuserstate.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $message.html('Usuario modificado satisfactoriamente'); 11 | $message.dialog({ 12 | title:'success Modificación satisfactoria', 13 | buttons:{ 14 | 'Volver al Usuario':function(){window.location = 'user.php?id=' + $('#id').val();}, 15 | 'Menu Principal':function(){window.location = 'menu.php';} 16 | } 17 | }); 18 | } 19 | else{ 20 | $message.html(value); 21 | $message.dialog({ 22 | title:'warning Error de datos', 23 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 24 | }); 25 | } 26 | $message.dialog('open'); 27 | }); 28 | $('#loader').hide(); 29 | $('input:button').show(); 30 | }); 31 | }); -------------------------------------------------------------------------------- /js/appointmentreport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#date').datepicker(); 5 | $('input:button').button().click(function(){ 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | var $formdata = $('form').serialize(); 9 | $('#data').slideUp(1000,function(){ 10 | $.post('modules/checkappointmentreportdata.php',$formdata,function(value){ 11 | if(value == '1'){ 12 | $.post('modules/getappointmentreportdata.php',$formdata,function(data){ 13 | $('#data').html(data).slideDown(1000,function(){ 14 | $('input:button').show(); 15 | $('#loader').hide(); 16 | }); 17 | $('table').tablesorter(); 18 | }); 19 | } 20 | else{ 21 | $message.html(value); 22 | $message.dialog({ 23 | title:'warning Error en los datos ingresados', 24 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 25 | }); 26 | $message.dialog('open'); 27 | $('input:button').show(); 28 | $('#loader').hide(); 29 | } 30 | }); 31 | }); 32 | }); 33 | }); -------------------------------------------------------------------------------- /js/statepatient.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('#loader').show(); 8 | $('input:button').hide(); 9 | $.post('modules/modifypatientstate.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $message.html('Paciente modificado satisfactoriamente'); 12 | $message.dialog({ 13 | title:'success Modificación satisfactoria', 14 | buttons:{ 15 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#id').val();}, 16 | 'Menu Principal':function(){window.location = 'menu.php';} 17 | } 18 | }); 19 | } 20 | else{ 21 | $message.html(value); 22 | $message.dialog({ 23 | title:'warning Error de datos', 24 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 25 | }); 26 | } 27 | $message.dialog('open'); 28 | }); 29 | $('#loader').hide(); 30 | $('input:button').show(); 31 | }); 32 | }); -------------------------------------------------------------------------------- /js/paymentreport.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#dateinit,#dateend').datepicker(); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | 6 | $('input:button').button().click(function(){ 7 | $('input:button').hide(); 8 | $('#loader').show(); 9 | var $formdata = $('form').serialize(); 10 | $('div#data').slideUp(1000,function(){ 11 | $.post('modules/checkpaymentreportdata.php',$formdata,function(value){ 12 | if(value == '1'){ 13 | $.post('modules/getpaymentreport.php',$formdata,function(data){ 14 | $('div#data').html(data).slideDown(1000,function(){ 15 | $('table').tablesorter(); 16 | $('input:button').show(); 17 | $('#loader').hide(); 18 | }); 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | $message.dialog('open'); 28 | $('input:button').show(); 29 | $('#loader').hide(); 30 | } 31 | }); 32 | }); 33 | }); 34 | 35 | }); -------------------------------------------------------------------------------- /js/stateappointment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('#loader').show(); 8 | $('input:button').hide(); 9 | $.post('modules/modifyappointmentstatus.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $message.html('Estado de Cita modificado satisfactoriamente'); 12 | $message.dialog({ 13 | title:'success Modificación satisfactoria', 14 | buttons:{ 15 | 'Reporte de Citas':function(){window.location = 'appointmentreport.php';}, 16 | 'Menu Principal':function(){window.location = 'menu.php';} 17 | } 18 | }); 19 | } 20 | else{ 21 | $message.html(value); 22 | $message.dialog({ 23 | title:'warning Error de datos', 24 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 25 | }); 26 | } 27 | $message.dialog('open'); 28 | $('#loader').hide(); 29 | $('input:button').show(); 30 | }); 31 | }); 32 | }); -------------------------------------------------------------------------------- /css/tablesorter.css: -------------------------------------------------------------------------------- 1 | table.tablesorter { 2 | background-color: #CDCDCD; 3 | font-size:0.8em; 4 | margin:10px 0pt 15px; 5 | text-align: left; 6 | width: 100%; 7 | } 8 | 9 | table.tablesorter td, table.tablesorter th{ 10 | border-color:#d6d6d6; 11 | border-style:solid; 12 | border-width:thin; 13 | } 14 | 15 | table.tablesorter thead tr th, table.tablesorter tfoot tr th { 16 | background-color: #e6EEEE; 17 | padding:4px; 18 | } 19 | 20 | table.tablesorter thead tr .header { 21 | background-image: url("../images/bg.gif"); 22 | background-repeat: no-repeat; 23 | background-position: center right; 24 | cursor: pointer; 25 | } 26 | 27 | table.tablesorter tbody td { 28 | color: #3D3D3D; 29 | padding: 4px; 30 | background-color: #FFF; 31 | vertical-align: top; 32 | } 33 | 34 | table.tablesorter tbody tr.odd td { 35 | background-color:#F0F0F6; 36 | } 37 | 38 | table.tablesorter thead tr .headerSortUp { 39 | background-image: url("../images/asc.gif"); 40 | } 41 | 42 | table.tablesorter thead tr .headerSortDown { 43 | background-image: url("../images/desc.gif"); 44 | } 45 | 46 | table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { 47 | background-color: #8dbdd8; 48 | } 49 | -------------------------------------------------------------------------------- /modules/modifypayment.php: -------------------------------------------------------------------------------- 1 | 0){ 19 | $update .= ',`number` = "' . trim($_POST['number']) . '"'; 20 | } 21 | else{ 22 | $update .= ',`number` = NULL'; 23 | } 24 | 25 | //Banco 26 | if($_POST['bank'] > 0){ 27 | $update .= ',`bank` = ' . $_POST['bank'] . ''; 28 | } 29 | else{ 30 | $update .= ',`bank` = NULL'; 31 | } 32 | 33 | //Descripcion 34 | $description = trim($_POST['description']); 35 | if(strlen($description) > 0){ 36 | $update .= ',`description` = "' . trim($_POST['description']) . '"'; 37 | } 38 | else{ 39 | $update .= ',`description` = NULL'; 40 | } 41 | 42 | $update .= ' WHERE id = ' . $_POST['id']; 43 | $handler = new DBHandler(); 44 | $success = $handler->executeQuery($update); 45 | if($success)echo $success; 46 | else echo $update; 47 | ?> -------------------------------------------------------------------------------- /js/activatebudget.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:text').attr('readonly','readonly'); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('input:button').hide(); 8 | $('#loader').show(); 9 | $.post('modules/activatebudget.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $message.html('Presupuesto activado satisfactoriamente'); 12 | $message.dialog({ 13 | title:'success Registro satisfactorio', 14 | buttons:{ 15 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 16 | 'Menu Principal':function(){window.location = 'menu.php';} 17 | } 18 | }); 19 | $message.dialog('open'); 20 | } 21 | else{ 22 | $message.html(value); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | $message.dialog('open'); 28 | } 29 | $('input:button').show(); 30 | $('#loader').hide(); 31 | }); 32 | }); 33 | }); -------------------------------------------------------------------------------- /css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 1em; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /js/consultbank.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $('#modifyform').slideUp(1000,function(){ 9 | $.post('modules/checkbank.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getbankdata.php',$formdata,function(data){ 12 | $(':text[name="id"]').val(data.id); 13 | $(':text[name="name"]').val(data.name); 14 | $('textarea[name="description"]').val(data.description); 15 | },'json'); 16 | $('#modifyform').slideDown(1000,function(){ 17 | $('input:button').show(); 18 | $('#loader').hide(); 19 | }); 20 | } 21 | else{ 22 | $message.html('Los datos ingresados no corresponden a ningun banco'); 23 | $message.dialog({ 24 | title:'warning Registro inválido', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | $message.dialog('open'); 28 | $('input:button').show(); 29 | $('#loader').hide(); 30 | } 31 | }); 32 | }); 33 | }); 34 | }); -------------------------------------------------------------------------------- /denied.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | Dental: Acceso Negado 12 | 13 | 14 | 15 | 16 | 17 | 18 | 26 | 27 |
28 |
29 |

No tiene autorización para ingresar a la opción 30 |
Consulte a gerencia para mayor información

31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /modules/checkpassworddata.php: -------------------------------------------------------------------------------- 1 | getUserDataById($_POST['id']); 5 | $success = true; 6 | 7 | //Verificacion de la contrasena antigua 8 | if(strlen(trim($_POST['oldpassword'])) == 0){ 9 | $success = false; 10 | echo '

Debe ingresar la contraseña antigua

'; 11 | } 12 | 13 | if($success && $userdata['password'] != MD5($_POST['oldpassword'])){ 14 | $success = false; 15 | echo '

La contraseña antigua no corresponde con la original

'; 16 | } 17 | 18 | //Verificacion de la contrasena nueva 19 | if(strlen(trim($_POST['newpassword'])) == 0){ 20 | if($success) $success = false; 21 | echo '

Debe ingresar la contraseña nueva

'; 22 | } 23 | 24 | if(strlen(trim($_POST['confirmedpassword'])) == 0){ 25 | if($success) $success = false; 26 | echo '

Debe confirmar la contraseña nueva

'; 27 | } 28 | 29 | if($success && strlen(($_POST['newpassword'])) < 5){ 30 | $success = false; 31 | echo '

La nueva contraseña debe tener como mínimo 5 caracteres

'; 32 | } 33 | 34 | if($success && $_POST['newpassword'] != $_POST['confirmedpassword']){ 35 | $success = false; 36 | echo '

La nueva contraseña no corresponde con la confirmada

'; 37 | } 38 | 39 | if($success) echo $success; 40 | ?> -------------------------------------------------------------------------------- /js/consultpaymenttype.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $('#modifyform').slideUp(1000,function(){ 9 | $.post('modules/checkpaymenttype.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getpaymenttypedata.php',$formdata,function(data){ 12 | $(':text[name="id"]').val(data.id); 13 | $(':text[name="name"]').val(data.name); 14 | $('textarea[name="description"]').val(data.description); 15 | },'json'); 16 | $('#modifyform').slideDown(1000,function(){ 17 | $('input:button').show(); 18 | $('#loader').hide(); 19 | }); 20 | } 21 | else{ 22 | $message.html('Los datos ingresados no corresponden a ninguna forma de pago'); 23 | $message.dialog({ 24 | title:'warning Registro inválido', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | $message.dialog('open'); 28 | $('input:button').show(); 29 | $('#loader').hide(); 30 | } 31 | }); 32 | }); 33 | }); 34 | }); -------------------------------------------------------------------------------- /modules/getpatientdata.php: -------------------------------------------------------------------------------- 1 | getPatientData($_POST['documenttype'],$documentnumber); 13 | } 14 | if($data != null){ 15 | $array = array( 16 | 'id' => $data['id'], 17 | 'firstname' => $data['firstname'], 18 | 'middlename' => $data['middlename'], 19 | 'firstlastname' => $data['firstlastname'], 20 | 'secondlastname' => $data['secondlastname'], 21 | 'sex' => getSexCode($data['sex']), 22 | 'documenttype' => getDocumentTypeCode($data['documenttype']), 23 | 'documentnumber' => $data['documentnumber'], 24 | 'birthdate' => toFormDate($data['birthdate']), 25 | 'bloodtype' => getBloodtypeCode($data['bloodtype']), 26 | 'address' => $data['address'], 27 | 'phonehome' => $data['phonehome'], 28 | 'phoneoffice' => $data['phoneoffice'], 29 | 'cellnumber' => $data['cellnumber'], 30 | 'email' => $data['email'], 31 | 'maritalstatus' => getMaritalstatusCode($data['maritalstatus']), 32 | 'occupation' => $data['occupation'] 33 | ); 34 | } 35 | echo json_encode($array); 36 | ?> -------------------------------------------------------------------------------- /js/consultproceduretype.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $('#modifyform').slideUp(1000,function(){ 9 | $.post('modules/checkproceduretype.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getproceduretypedata.php',$formdata,function(data){ 12 | $(':text[name="id"]').val(data.id); 13 | $(':text[name="name"]').val(data.name); 14 | $('textarea[name="description"]').val(data.description); 15 | },'json'); 16 | $('#modifyform').slideDown(1000,function(){ 17 | $('input:button').show(); 18 | $('#loader').hide(); 19 | }); 20 | } 21 | else{ 22 | $message.html('Los datos ingresados no corresponden a ningun tipo de procedimiento'); 23 | $message.dialog({ 24 | title:'warning Registro inválido', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | $message.dialog('open'); 28 | $('input:button').show(); 29 | $('#loader').hide(); 30 | } 31 | }); 32 | }); 33 | }); 34 | 35 | }); -------------------------------------------------------------------------------- /modules/addpayment.php: -------------------------------------------------------------------------------- 1 | 0){ 33 | $insert .= ',`number`'; 34 | $values .= ',"' . $number . '"'; 35 | } 36 | 37 | //Banco 38 | if($_POST['bank'] > 0){ 39 | $insert .= ',`bank`'; 40 | $values .= ',' . $_POST['bank'] . ''; 41 | } 42 | 43 | //Descripcion 44 | $description = trim($_POST['description']); 45 | if(strlen($description) > 0){ 46 | $insert .= ',`description`'; 47 | $values .= ',"' . $description . '"'; 48 | } 49 | 50 | $query = $insert . ') ' . $values . ')'; 51 | 52 | $success = $Handler->executeQuery($query); 53 | echo $success; 54 | ?> -------------------------------------------------------------------------------- /js/index.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkuserlogin.php',$formdata,function(data){ 9 | switch(data){ 10 | 11 | case '-1': 12 | $message.html('Usuario y/o Contraseña no válidos'); 13 | $message.dialog({ 14 | title:'warning Registro inválido', 15 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 16 | }); 17 | $message.dialog('open'); 18 | break; 19 | 20 | case '0': 21 | $message.html('El usuario no se encuentra activo
Consulte a gerencia para el proceso de activación'); 22 | $message.dialog({ 23 | title:'warning Usuario no activo', 24 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 25 | }); 26 | $message.dialog('open'); 27 | break; 28 | 29 | case '1': 30 | $.post('modules/startsession.php',$formdata,function(){location.href = 'menu.php';}); 31 | break; 32 | } 33 | $('input:button').show(); 34 | $('#loader').hide(); 35 | }); 36 | }); 37 | }); -------------------------------------------------------------------------------- /js/consultspecialty.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $('#modifyform').slideUp(1000,function(){ 9 | $.post('modules/checkspecialty.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getspecialtydata.php',$formdata,function(data){ 12 | $(':text[name="id"]').val(data.id); 13 | $(':text[name="name"]').val(data.name); 14 | $(':text[name="fee"]').val(data.fee); 15 | $('textarea[name="description"]').val(data.description); 16 | },'json'); 17 | $('#modifyform').slideDown(1000,function(){ 18 | $('input:button').show(); 19 | $('#loader').hide(); 20 | }); 21 | } 22 | else{ 23 | $message.html('Los datos ingresados no corresponden a ninguna especialidad'); 24 | $message.dialog({ 25 | title:'warning Registro inválido', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | $message.dialog('open'); 29 | $('input:button').show(); 30 | $('#loader').hide(); 31 | } 32 | }); 33 | }); 34 | }); 35 | }); -------------------------------------------------------------------------------- /js/consultlocation.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#searchbutton').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('#searchbutton').hide(); 7 | $('#searchloader').show(); 8 | $('#modifycontainer').slideUp(1000,function(){ 9 | $.post('modules/checklocation.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getlocationdata.php',$formdata,function(data){ 12 | $(':text[name="id"]').val(data.id); 13 | $(':text[name="code"]').val(data.code); 14 | $(':text[name="name"]').val(data.name); 15 | $('textarea[name="description"]').val(data.description); 16 | },'json'); 17 | $('#modifycontainer').slideDown(1000,function(){ 18 | $('#searchbutton').show(); 19 | $('#searchloader').hide(); 20 | }); 21 | } 22 | else{ 23 | $message.html('Los datos ingresados no corresponden a ninguna ubicación oral'); 24 | $message.dialog({ 25 | title:'warning Registro inválido', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | $message.dialog('open'); 29 | $('#searchbutton').show(); 30 | $('#searchloader').hide(); 31 | } 32 | }); 33 | }); 34 | }); 35 | }); -------------------------------------------------------------------------------- /modules/getuserdata.php: -------------------------------------------------------------------------------- 1 | getUserData($_POST['documenttype'],$_POST['documentnumber']); 9 | } 10 | if($data != null){ 11 | if($data['specialty'] == null) 12 | $data['specialty'] = 0; 13 | $array = array( 14 | 'id' => $data['id'], 15 | 'firstname' => $data['firstname'], 16 | 'middlename' => $data['middlename'], 17 | 'firstlastname' => $data['firstlastname'], 18 | 'secondlastname' => $data['secondlastname'], 19 | 'sex' => getSexCode($data['sex']), 20 | 'documenttype' => getDocumentTypeCode($data['documenttype']), 21 | 'documentnumber' => $data['documentnumber'], 22 | 'birthdate' => toFormDate($data['birthdate']), 23 | 'bloodtype' => getBloodtypeCode($data['bloodtype']), 24 | 'address' => $data['address'], 25 | 'phonehome' => $data['phonehome'], 26 | 'phoneoffice' => $data['phoneoffice'], 27 | 'cellnumber' => $data['cellnumber'], 28 | 'email' => $data['email'], 29 | 'maritalstatus' => getMaritalstatusCode($data['maritalstatus']), 30 | 'dentist' => $data['dentist'], 31 | 'specialty' => $data['specialty'], 32 | 'username' => $data['username'], 33 | 'privileges' => getPrivilegesCode($data['privileges']) 34 | ); 35 | } 36 | echo json_encode($array); 37 | ?> -------------------------------------------------------------------------------- /modules/addappointment.php: -------------------------------------------------------------------------------- 1 | 0){ 48 | $insert .= ',`description`'; 49 | $values .= ',"' . $description . '"'; 50 | } 51 | 52 | $query = $insert . ') ' . $values . ')'; 53 | 54 | $handler = new DBHandler(); 55 | $success = $handler->executeQuery($query); 56 | 57 | if($success) 58 | echo $success; 59 | else 60 | echo $query; 61 | ?> -------------------------------------------------------------------------------- /js/consultsubprocedure.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#searchbutton').button().click(function(){ 5 | var $searchdata = $('#searchform').serialize(); 6 | $('#searchloader').show(); 7 | $('#searchbutton').hide(); 8 | $('#modifycontainer').slideUp(1000,function(){ 9 | $.post('modules/checksubprocedure.php',$searchdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getsubproceduredata.php',$searchdata,function(data){ 12 | $('select[name="procedure"]').removeAttr('disabled'); 13 | $(':text[name="id"]').val(data.id); 14 | $(':text[name="code"]').val(data.code); 15 | $(':text[name="name"]').val(data.name); 16 | $(':text[name="price"]').val(data.price); 17 | $('select[name="procedure"]').val(data.procedure); 18 | $('textarea[name="description"]').val(data.description); 19 | $('select[name="procedure"]').attr('disabled','disabled'); 20 | },'json'); 21 | $('#modifycontainer').slideDown(1000); 22 | } 23 | else{ 24 | $message.html('Los datos ingresados no corresponden a ningún subprocedimiento'); 25 | $message.dialog({ 26 | title:'warning Registro inválido', 27 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 28 | }); 29 | $message.dialog('open'); 30 | } 31 | $('#searchloader').hide(); 32 | $('#searchbutton').show(); 33 | }); 34 | }); 35 | }); 36 | }); -------------------------------------------------------------------------------- /js/addbank.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkbankdata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addbank.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nuevo banco registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Banco':function(){window.location = 'addbank.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | }); 40 | $('input:button').show(); 41 | $('#loader').hide(); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/modifypassword.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('input:text[name=id]').attr('readonly','readonly'); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('#loader').show(); 8 | $('input:button').hide(); 9 | $.post('modules/checkpassworddata.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/modifypassword.php',$formdata,function(data){ 12 | if(data == '1'){ 13 | $message.html('Contraseña modificada satisfactoriamente'); 14 | $message.dialog({ 15 | title:'success Modificación satisfactoria', 16 | buttons:{ 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error de modificación', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error de datos', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | }); 40 | $('#loader').hide(); 41 | $('input:button').show(); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addhistory.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#date').datepicker(); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $.post('modules/checkhistorydata.php',$formdata,function(value){ 8 | if(value == '1'){ 9 | 10 | // 11 | $.post('modules/addhistory.php',$formdata,function(data){ 12 | if(data == '1'){ 13 | $message.html('Historia clinica ingresada satisfactoriamente'); 14 | $message.dialog({ 15 | title:'success Registro satisfactorio', 16 | buttons:{ 17 | 'Volver a la historia clinica':function(){window.location = 'medicalrecord.php?id=' + $('#patient').val();}, 18 | 'Menu Principal':function(){window.location = 'menu.php';} 19 | } 20 | }); 21 | } 22 | else{ 23 | $message.html(data); 24 | $message.dialog({ 25 | title:'warning Error en el registro', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | } 29 | $message.dialog('open'); 30 | }); 31 | // 32 | 33 | 34 | } 35 | else{ 36 | $message.html(value); 37 | $message.dialog({ 38 | title:'warning Error en el registro', 39 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 40 | }); 41 | $message.dialog('open'); 42 | } 43 | }); 44 | }); 45 | }); -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | Dental: Salida del Sistema 15 | 16 | 17 | 18 | 19 | 20 | 23 |
24 |
25 | 28 | success 29 |

Sesión finalizada satisfactoriamente
Haga clic aqui para volver a ingresar al sistema

30 | 34 | warning 35 |

Error al finalizar la sesión

36 |

Regrese al menú principal e intente salir de nuevo del sistema

37 |

Si el problema persiste comuníquese con el administrador del sistema

38 | 41 |
42 |
43 | 44 | -------------------------------------------------------------------------------- /modules/checkpaymentdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar la fecha del recaudo

"; 11 | } 12 | else{ 13 | $array = splitDate($date); 14 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 15 | if($success) $success = false; 16 | echo '

Formato inválido de la fecha del recaudo

'; 17 | } 18 | else{ 19 | if(!checkdate($array[0],$array[1],$array[2])){ 20 | if($success) $success = false; 21 | echo '

La fecha ingresada no existe

'; 22 | } 23 | } 24 | } 25 | 26 | //El valor es obligatorio y debe ser numerico 27 | $value = trim($_POST['value']); 28 | if(strlen($value) < 1){ 29 | if($success) $success = false; 30 | echo "

Debe ingresar el valor del recaudo

"; 31 | } 32 | else{ 33 | if(!is_numeric($value)){ 34 | if($success) $success = false; 35 | echo "

El valor del recaudo debe ser numérico

"; 36 | } 37 | } 38 | 39 | //La forma de pago es obligatoria 40 | if($_POST['paymenttype'] == 0){ 41 | if($success) $success = false; 42 | echo '

Debe ingresar la forma de pago

'; 43 | } 44 | 45 | //La descripcion debe ser menor de 2000 caracteres 46 | if(strlen(trim($_POST['description'])) > 2000){ 47 | if($success) $success = false; 48 | echo '

La descripción debe ser menor de 2000 caracteres

'; 49 | } 50 | 51 | if($success) echo $success; 52 | ?> -------------------------------------------------------------------------------- /js/addspecialty.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkspecialtydata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addspecialty.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nueva especialidad registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Especialidad':function(){window.location = 'addspecialty.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | }); 40 | $('input:button').show(); 41 | $('#loader').hide(); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addprocedure.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkproceduredata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addprocedure.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nuevo procedimiento registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Procedimiento':function(){window.location = 'addprocedure.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | $('input:button').show(); 40 | $('#loader').hide(); 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /error.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | Dental: Error de Acceso 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 28 |
29 |
30 |

Se presentó un error de página 31 |
32 | Consulte a gerencia para mayor información

33 |
34 |
35 | 36 | -------------------------------------------------------------------------------- /js/addlocation.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checklocationdata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addlocation.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nueva Ubicación Oral registrada satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Ubicacion Oral':function(){window.location = 'addlocation.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | $('input:button').show(); 40 | $('#loader').hide(); 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addpaymenttype.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkpaymenttypedata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addpaymenttype.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nueva forma de pago registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Forma de Pago':function(){window.location = 'addpaymenttype.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | }); 40 | $('input:button').show(); 41 | $('#loader').hide(); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/modifybudget.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkbudgetdata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/modifybudgetinfo.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Presupuesto modificado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | $('input:button').show(); 40 | $('#loader').hide(); 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addsubprocedure.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loaer').show(); 8 | $.post('modules/checksubproceduredata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addsubprocedure.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nuevo subprocedimiento registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Subprocedimiento':function(){window.location = 'addsubprocedure.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | $('input:button').show(); 40 | $('#loaer').hide(); 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addpayment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#date').datepicker(); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('input:button').hide(); 8 | $('#loader').show(); 9 | $.post('modules/checkpaymentdata.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/addpayment.php',$formdata,function(data){ 12 | if(data == '1'){ 13 | $message.html('Recaudo registrado satisfactoriamente'); 14 | $message.dialog({ 15 | title:'success Registro satisfactorio', 16 | buttons:{ 17 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 18 | 'Menu Principal':function(){window.location = 'menu.php';} 19 | } 20 | }); 21 | } 22 | else{ 23 | $message.html(data); 24 | $message.dialog({ 25 | title:'warning Error en el registro', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | } 29 | $message.dialog('open'); 30 | }); 31 | } 32 | else{ 33 | $message.html(value); 34 | $message.dialog({ 35 | title:'warning Error en los datos ingresados', 36 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 37 | }); 38 | $message.dialog('open'); 39 | } 40 | $('#loader').hide(); 41 | $('input:button').show(); 42 | }); 43 | }); 44 | }); -------------------------------------------------------------------------------- /js/addproceduretype.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('form').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $.post('modules/checkproceduretypedata.php',$formdata,function(value){ 9 | if(value == '1'){ 10 | $.post('modules/addproceduretype.php',$formdata,function(data){ 11 | if(data == '1'){ 12 | $message.html('Nuevo tipo de procedimiento registrado satisfactoriamente'); 13 | $message.dialog({ 14 | title:'success Registro satisfactorio', 15 | buttons:{ 16 | 'Ingresar Tipo de Procedimiento':function(){window.location = 'addproceduretype.php';}, 17 | 'Menu Principal':function(){window.location = 'menu.php';} 18 | } 19 | }); 20 | } 21 | else{ 22 | $message.html(data); 23 | $message.dialog({ 24 | title:'warning Error en el registro', 25 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 26 | }); 27 | } 28 | $message.dialog('open'); 29 | }); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en los datos ingresados', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | $('input:button').show(); 40 | $('#loader').hide(); 41 | }); 42 | }); 43 | }); -------------------------------------------------------------------------------- /js/addbudget.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#date').datepicker(); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('input:button').hide(); 8 | $('#loader').show(); 9 | $.post('modules/checkbudgetdata.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/addbudget.php',$formdata,function(data){ 12 | if(data == '1'){ 13 | $message.html('Nuevo presupuesto generado satisfactoriamente'); 14 | $message.dialog({ 15 | title:'success Registro satisfactorio', 16 | buttons:{ 17 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 18 | 'Menu Principal':function(){window.location = 'menu.php';} 19 | } 20 | }); 21 | } 22 | else{ 23 | $message.html(data); 24 | $message.dialog({ 25 | title:'warning Error en el registro', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | } 29 | $message.dialog('open'); 30 | }); 31 | } 32 | else{ 33 | $message.html(value); 34 | $message.dialog({ 35 | title:'warning Error en los datos ingresados', 36 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 37 | }); 38 | $message.dialog('open'); 39 | } 40 | $('input:button').show(); 41 | $('#loader').hide(); 42 | }); 43 | }); 44 | }); -------------------------------------------------------------------------------- /js/consultprocedure.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('input:button').button().click(function(){ 5 | var $formdata = $('#searchform').serialize(); 6 | $('input:button').hide(); 7 | $('#loader').show(); 8 | $('#modifycontainer').slideUp(1000,function(){ 9 | $.post('modules/checkprocedure.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/getproceduredata.php',$formdata,function(data){ 12 | $('select[name="proceduretype"]').removeAttr('disabled'); 13 | $(':text[name="id"]').val(data.id); 14 | $(':text[name="code"]').val(data.code); 15 | $(':text[name="name"]').val(data.name); 16 | $(':text[name="price"]').val(data.price); 17 | $('select[name="proceduretype"]').val(data.proceduretype); 18 | $('textarea[name="description"]').val(data.description); 19 | $('select[name="proceduretype"]').attr('disabled','disabled'); 20 | },'json'); 21 | $('#modifycontainer').slideDown(1000,function(){ 22 | $('input:button').show(); 23 | $('#loader').hide(); 24 | }); 25 | } 26 | else{ 27 | $message.html('Los datos ingresados no corresponden a ningún procedimiento'); 28 | $message.dialog({ 29 | title:'warning Registro inválido', 30 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 31 | }); 32 | $message.dialog('open'); 33 | $('input:button').show(); 34 | $('#loader').hide(); 35 | } 36 | }); 37 | }); 38 | }); 39 | }); -------------------------------------------------------------------------------- /js/addpatient.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $('#birthdate').datepicker({changeMonth:true,changeYear:true}); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | $('input:button').button().click(function(){ 6 | var $formdata = $('form').serialize(); 7 | $('input:button').hide(); 8 | $('#loader').show(); 9 | $.post('modules/checkpatientdata.php',$formdata,function(value){ 10 | if(value == '1'){ 11 | $.post('modules/addpatient.php',$formdata,function(data){ 12 | if(data == '1'){ 13 | $message.html('Nuevo paciente registrado satisfactoriamente'); 14 | $message.dialog({ 15 | title:'success Registro satisfactorio', 16 | buttons:{ 17 | 'Ingresar otro paciente':function(){window.location = 'addpatient.php';}, 18 | 'Menu Principal':function(){window.location = 'menu.php';} 19 | } 20 | }); 21 | } 22 | else{ 23 | $message.html(data); 24 | $message.dialog({ 25 | title:'warning Error en el registro', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | } 29 | $message.dialog('open'); 30 | }); 31 | } 32 | else{ 33 | $message.html(value); 34 | $message.dialog({ 35 | title:'warning Error en los datos ingresados', 36 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 37 | }); 38 | $message.dialog('open'); 39 | } 40 | $('input:button').show(); 41 | $('#loader').hide(); 42 | }); 43 | }); 44 | }); -------------------------------------------------------------------------------- /js/modifypayment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#date').datepicker(); 5 | 6 | $('input:button').button().click(function(){ 7 | var $formdata = $('form').serialize(); 8 | $('input:button').hide(); 9 | $('#loader').show(); 10 | $.post('modules/checkpaymentdata.php',$formdata,function(value){ 11 | if(value == '1'){ 12 | $.post('modules/modifypayment.php',$formdata,function(data){ 13 | if(data == '1'){ 14 | $message.html('Recaudo modificado satisfactoriamente'); 15 | $message.dialog({ 16 | title:'success Modificación satisfactoria', 17 | buttons:{ 18 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 19 | 'Menu Principal':function(){window.location = 'menu.php';} 20 | } 21 | }); 22 | } 23 | else{ 24 | $message.html(data); 25 | $message.dialog({ 26 | title:'warning Error en los datos ingresados', 27 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 28 | }); 29 | } 30 | $message.dialog('open'); 31 | }); 32 | } 33 | else{ 34 | $message.html(value); 35 | $message.dialog({ 36 | title:'warning Error en los datos ingresados', 37 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 38 | }); 39 | $message.dialog('open'); 40 | } 41 | $('input:button').show(); 42 | $('#loader').hide(); 43 | }); 44 | }); 45 | }); -------------------------------------------------------------------------------- /js/modifypatient.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#birthdate').datepicker({changeMonth:true,changeYear:true}); 5 | 6 | $('input:button').button().click(function(){ 7 | var $formdata = $('form').serialize(); 8 | $('#loader').show(); 9 | $('input:button').hide(); 10 | $.post('modules/checkpatientdata.php',$formdata,function(value){ 11 | if(value == '1'){ 12 | $.post('modules/modifypatient.php',$formdata,function(data){ 13 | if(data == '1'){ 14 | $message.html('Paciente modificado satisfactoriamente'); 15 | $message.dialog({ 16 | title:'success Modificación satisfactoria', 17 | buttons:{ 18 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#id').val();}, 19 | 'Menu Principal':function(){window.location = 'menu.php';} 20 | } 21 | }); 22 | } 23 | else{ 24 | $message.html(data); 25 | $message.dialog({ 26 | title:'warning Error de modificación', 27 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 28 | }); 29 | } 30 | $message.dialog('open'); 31 | }); 32 | } 33 | else{ 34 | $message.html(value); 35 | $message.dialog({ 36 | title:'warning Error de datos', 37 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 38 | }); 39 | $message.dialog('open'); 40 | } 41 | }); 42 | $('#loader').hide(); 43 | $('input:button').show(); 44 | }); 45 | }); -------------------------------------------------------------------------------- /modules/activatebudget.php: -------------------------------------------------------------------------------- 1 | executeQuery($update); 7 | $def = true; 8 | if($success){ 9 | $budgetinfocount = $handler->getBudgetInfoCount($_POST['id']); 10 | if($budgetinfocount > 0){ 11 | $budgetinfolist = $handler->getBudgetInfoList($_POST['id']); 12 | for($i = 0;$i < $budgetinfocount;$i += 1){ 13 | $subprocedurecount = $handler->getSubprocedureCount($budgetinfolist[$i][2]); 14 | if($subprocedurecount > 0){ 15 | $subprocedurelist = $handler->getSubprocedureList($budgetinfolist[$i][2]); 16 | for($j = 0;$j < $subprocedurecount;$j += 1){ 17 | $insert = 'INSERT INTO `dental`.`budgetevolve`('; 18 | $values = 'VALUES('; 19 | 20 | //budget 21 | $insert .= '`budget`'; 22 | $values .= '' . $budgetinfolist[$i][1] . ''; 23 | 24 | //budgetinfo 25 | $insert .= ',`budgetinfo`'; 26 | $values .= ',' . $budgetinfolist[$i][0] . ''; 27 | 28 | //procedure 29 | $insert .= ',`procedure`'; 30 | $values .= ',' . $budgetinfolist[$i][2] . ''; 31 | 32 | //subprocedure 33 | $insert .= ',`subprocedure`'; 34 | $values .= ',' . $subprocedurelist[$j][0] . ''; 35 | 36 | //location 37 | $insert .= ',`location`'; 38 | $values .= ',' . $budgetinfolist[$i][3] . ''; 39 | 40 | $query = $insert . ') ' . $values . ')'; 41 | $success = $handler->executeQuery($query); 42 | if(!$success) $def = false; 43 | } 44 | } 45 | } 46 | echo $def; 47 | } 48 | } 49 | else{ 50 | echo $success; 51 | } 52 | ?> -------------------------------------------------------------------------------- /modules/getappointmentreportdata.php: -------------------------------------------------------------------------------- 1 | 0){ 10 | $count = $handler->getAppointmentCountByDateAndDentist($date,$_POST['dentist']); 11 | $list = $handler->getAppointmentListByDateAndDentist($date,$_POST['dentist']); 12 | } 13 | else{ 14 | $count = $handler->getAppointmentCount($date); 15 | $list = $handler->getAppointmentList($date); 16 | } 17 | if($count > 0){ 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 |
Id CitaPacienteDentistaHora InicioHora FinTipoEstado
getPatientName($list[$i][1]);?>getUserName($list[$i][2]);?>getHour($list[$i][4]);?>getHour($list[$i][5]);?>
41 | 45 |

No hay citas registradas para este día

46 | Registro satisfactorio', 17 | buttons:{ 18 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 19 | 'Menu Principal':function(){window.location = 'menu.php';} 20 | } 21 | }); 22 | $message.dialog('open'); 23 | } 24 | else{ 25 | $message.html(data); 26 | $message.dialog({ 27 | title:'warning Error de datos', 28 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 29 | }); 30 | $message.dialog('open'); 31 | } 32 | }); 33 | } 34 | else{ 35 | $message.html(value); 36 | $message.dialog({ 37 | title:'warning Error de datos', 38 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 39 | }); 40 | $message.dialog('open'); 41 | } 42 | $('input:button').show(); 43 | $('#loader').hide(); 44 | }); 45 | }); 46 | }); -------------------------------------------------------------------------------- /modules/checkbudgetdata.php: -------------------------------------------------------------------------------- 1 | Error en los datos del paciente y/o usuario

'; 7 | } 8 | 9 | //Revision de cada uno de los procedimientos 10 | $total = 0; 11 | for($i = 1;$i <= 20;$i += 1){ 12 | $procedure = 'procedure' . $i; 13 | $location = 'location' . $i; 14 | if($_POST[$procedure] > 0 && $_POST[$location] == 0){ 15 | if($success) $success = false; 16 | echo '

Debe ingresar la ubicación en el procedimiento ' . $i . '

'; 17 | } 18 | else{ 19 | if($_POST[$procedure] == 0 && $_POST[$location] > 0){ 20 | if($success) $success = false; 21 | echo '

Debe ingresar el procedimiento en la ubicación ' . $i . '

'; 22 | } 23 | else{ 24 | if($_POST[$procedure] > 0 && $_POST[$location] > 0){ 25 | $total += 1; 26 | } 27 | } 28 | } 29 | } 30 | if($success && $total == 0){ 31 | $success = false; 32 | echo '

Debe ingresar al menos un procedimiento

'; 33 | } 34 | 35 | $discount = trim($_POST['discount']); 36 | if(!is_numeric($discount)){ 37 | if($success) $success = false; 38 | echo '

El valor del descuento no es válido

'; 39 | } 40 | else{ 41 | if($discount < 0 || $discount > 1){ 42 | if($success) $success = false; 43 | echo '

El valor del descuento debe estar entre 0 y 1

'; 44 | } 45 | } 46 | 47 | //La descripcion debe ser menor de 2000 caracteres 48 | if(strlen(trim($_POST['description'])) > 2000){ 49 | if($success) $success = false; 50 | echo '

La descripción debe ser menor de 2000 caracteres

'; 51 | } 52 | 53 | if($success) echo $success; 54 | ?> -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | Dental: Ingreso al Sistema 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 |
24 |
25 | Ingreso de Usuario 26 |
27 |

28 | 29 | 30 |

31 |

32 | 33 | 34 |

35 |

36 | 37 | 38 |

39 |
40 |
41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /modules/getpaymentreport.php: -------------------------------------------------------------------------------- 1 | getPaymentReportCount($init,$end); 10 | $sum = 0; 11 | if($total > 0){ 12 | $list = $handler->getPaymentReportList($init,$end); 13 | ?> 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 |
IdPacienteUsuarioFechaValorForma de pagoNúmeroBancoDescripción
getPatientName($list[$i][1]);?>getUserName($list[$i][2]);?>$getPaymenttypeName($list[$i][5]);?>getBankName($list[$i][7]);?>
37 |

Total recaudos: $

38 | 42 |

No hay recaudos registrados durante las fechas indicadas

43 | -------------------------------------------------------------------------------- /test.php: -------------------------------------------------------------------------------- 1 | 5 | $code = fromHexValue(data.d.charAt(0));
6 | if($code == 'r' || $code == 'b' || $code == 'l' || $code == 'p' || $code == 'g' || $code == 'o') $code = 't' + $code;
7 | $('#dt').attr('src','images/odontogram/' + $code + '.png');
8 | $code = fromHexValue(data.d.charAt(1));
9 | if($code == 'r' || $code == 'b' || $code == 'l' || $code == 'p' || $code == 'g' || $code == 'o') $code = 'l' + $code;
10 | $('#dl').attr('src','images/odontogram/' + $code + '.png');
11 | $code = fromHexValue(data.d.charAt(2));
12 | if($code == 'r' || $code == 'b' || $code == 'l' || $code == 'p' || $code == 'g' || $code == 'o') $code = 'b' + $code;
13 | $('#db').attr('src','images/odontogram/' + $code + '.png');
14 | $code = fromHexValue(data.d.charAt(3));
15 | if($code == 'r' || $code == 'b' || $code == 'l' || $code == 'p' || $code == 'g' || $code == 'o') $code = 'r' + $code;
16 | $('#dr').attr('src','images/odontogram/' + $code + '.png');
17 | $code = fromHexValue(data.d.charAt(4));
18 | if($code == 'r' || $code == 'b' || $code == 'l' || $code == 'p' || $code == 'g' || $code == 'o') $code = 'c' + $code;
19 | $('#dc').attr('src','images/odontogram/' + $code + '.png');
20 | $code = fromHexValue(data.d.charAt(5));
21 | if($code == 'n') $code = 'bk';
22 | $('#ds').attr('src','images/odontogram/' + $code + '.png');
23 | -------------------------------------------------------------------------------- /js/modifyuser.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | 5 | $('select[name="dentist"]').change(function(){ 6 | if($('select[name="specialty"]').attr('disabled')) 7 | $('select[name="specialty"]').removeAttr('disabled'); 8 | else 9 | $('select[name="specialty"]').attr('disabled','disabled'); 10 | }); 11 | 12 | $('input:button').click(function(){ 13 | var $formdata = $('form').serialize(); 14 | $('#loader').show(); 15 | $('input:button').hide(); 16 | $.post('modules/checkuserdata.php',$formdata,function(value){ 17 | if(value == '1'){ 18 | $.post('modules/modifyuser.php',$formdata,function(data){ 19 | if(data == '1'){ 20 | $message.html('Usuario modificado satisfactoriamente'); 21 | $message.dialog({ 22 | title:'success Modificación satisfactoria', 23 | buttons:{ 24 | 'Volver al Usuario':function(){window.location = 'user.php?id=' + $('#id').val();}, 25 | 'Menu Principal':function(){window.location = 'menu.php';} 26 | } 27 | }); 28 | } 29 | else{ 30 | $message.html(data); 31 | $message.dialog({ 32 | title:'warning Error de modificación', 33 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 34 | }); 35 | } 36 | $message.dialog('open'); 37 | }); 38 | } 39 | else{ 40 | $message.html(value); 41 | $message.dialog({ 42 | title:'warning Error de datos', 43 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 44 | }); 45 | $message.dialog('open'); 46 | } 47 | }); 48 | $('#loader').hide(); 49 | $('input:button').show(); 50 | }); 51 | }); -------------------------------------------------------------------------------- /js/adduser.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#birthdate').datepicker({changeMonth:true,changeYear:true}); 5 | $('select[name="dentist"]').change(function(){ 6 | if($('select[name="dentist"]').val() == 0){ 7 | $('select[name="specialty"]').attr('disabled','disabled'); 8 | } 9 | else{ 10 | $('select[name="specialty"]').removeAttr('disabled'); 11 | } 12 | }); 13 | $('input:button').button().click(function(){ 14 | var $formdata = $('form').serialize(); 15 | $('input:button').hide(); 16 | $('#loader').show(); 17 | $.post('modules/checkuserdata.php',$formdata,function(value){ 18 | if(value == '1'){ 19 | $.post('modules/adduser.php',$formdata,function(data){ 20 | if(data == '1'){ 21 | $message.html('Nuevo usuario registrado satisfactoriamente'); 22 | $message.dialog({ 23 | title:'success Registro satisfactorio', 24 | buttons:{ 25 | 'Ingresar otro usuario':function(){window.location = 'adduser.php';}, 26 | 'Menu Principal':function(){window.location = 'menu.php';} 27 | } 28 | }); 29 | } 30 | else{ 31 | $message.html(data); 32 | $message.dialog({ 33 | title:'warning Error en el registro', 34 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 35 | }); 36 | } 37 | $message.dialog('open'); 38 | }); 39 | } 40 | else{ 41 | $message.html(value); 42 | $message.dialog({ 43 | title:'warning Error en los datos ingresados', 44 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 45 | }); 46 | $message.dialog('open'); 47 | } 48 | }); 49 | $('input:button').show(); 50 | $('#loader').hide(); 51 | }); 52 | }); -------------------------------------------------------------------------------- /modules/modifyhistory.php: -------------------------------------------------------------------------------- 1 | executeQuery($update); 40 | if($success) echo $success; 41 | else echo $update; 42 | ?> -------------------------------------------------------------------------------- /modules/checkpaymentreportdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar la fecha de inicio

'; 10 | } 11 | else{ 12 | $array = splitDate($date); 13 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 14 | if($success) $success = false; 15 | echo '

Formato inválido de la fecha de inicio

'; 16 | } 17 | else{ 18 | if(!checkdate($array[0],$array[1],$array[2])){ 19 | if($success) $success = false; 20 | echo '

La fecha de inicio no existe

'; 21 | } 22 | } 23 | } 24 | 25 | //La fecha de finalizacion es obligatoria y con el formato mm/dd/aaaa 26 | $date = trim($_POST['dateend']); 27 | if(strlen($date) < 1){ 28 | if($success) $success = false; 29 | echo '

Debe ingresar la fecha de finalización

'; 30 | } 31 | else{ 32 | $array = splitDate($date); 33 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 34 | if($success) $success = false; 35 | echo '

Formato inválido de la fecha de finalización

'; 36 | } 37 | else{ 38 | if(!checkdate($array[0],$array[1],$array[2])){ 39 | if($success) $success = false; 40 | echo '

La fecha de finalización no existe

'; 41 | } 42 | } 43 | } 44 | 45 | if($success){ 46 | $arrayinit = splitDate(trim($_POST['dateinit'])); 47 | $arrayend = splitDate(trim($_POST['dateend'])); 48 | $init = strtotime($arrayinit[2] . '-' . $arrayinit[0] . '-' . $arrayinit[1]); 49 | $end = strtotime($arrayend[2] . '-' . $arrayend[0] . '-' . $arrayend[1]); 50 | if($init > $end){ 51 | $success = false; 52 | echo '

La fecha de inicio no puede ser posterior a la de finalización

'; 53 | } 54 | } 55 | 56 | if($success) echo $success; 57 | ?> -------------------------------------------------------------------------------- /modules/checkfeereportdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar la fecha de inicio

'; 11 | } 12 | else{ 13 | $array = splitDate($date); 14 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 15 | if($success) $success = false; 16 | echo '

Formato inválido de la fecha de inicio

'; 17 | } 18 | else{ 19 | if(!checkdate($array[0],$array[1],$array[2])){ 20 | if($success) $success = false; 21 | echo '

La fecha de inicio no existe

'; 22 | } 23 | } 24 | } 25 | 26 | //La fecha de finalizacion es obligatoria y con el formato mm/dd/aaaa 27 | $date = trim($_POST['dateend']); 28 | if(strlen($date) < 1){ 29 | if($success) $success = false; 30 | echo '

Debe ingresar la fecha de finalización

'; 31 | } 32 | else{ 33 | $array = splitDate($date); 34 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 35 | if($success) $success = false; 36 | echo '

Formato inválido de la fecha de finalización

'; 37 | } 38 | else{ 39 | if(!checkdate($array[0],$array[1],$array[2])){ 40 | if($success) $success = false; 41 | echo '

La fecha de finalización no existe

'; 42 | } 43 | } 44 | } 45 | 46 | if($success){ 47 | $arrayinit = splitDate(trim($_POST['dateinit'])); 48 | $arrayend = splitDate(trim($_POST['dateend'])); 49 | $init = strtotime($arrayinit[2] . '-' . $arrayinit[0] . '-' . $arrayinit[1]); 50 | $end = strtotime($arrayend[2] . '-' . $arrayend[0] . '-' . $arrayend[1]); 51 | if($init > $end){ 52 | $success = false; 53 | echo '

La fecha de inicio no puede ser posterior a la de finalización

'; 54 | } 55 | } 56 | 57 | if($success) echo $success; 58 | ?> -------------------------------------------------------------------------------- /modules/checkproceduredata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el código del procedimiento

"; 11 | } 12 | else{ 13 | $id = $handler->getProcedureId($code); 14 | if(isset($_POST['id'])){//Se esta modificando el procedimiento 15 | if($id != 0 && $id != $_POST['id']){ 16 | $success = false; 17 | echo '

Ya se encuentra registrado el código del procedimiento

'; 18 | } 19 | } 20 | else{//Se esta agregando el procedimiento 21 | if($id != 0){ 22 | if($success) $success = false; 23 | echo '

Ya se encuentra registrado el código del procedimiento

'; 24 | } 25 | } 26 | } 27 | 28 | //El nombre es obligatorio 29 | if(strlen(trim($_POST['name'])) < 1){ 30 | if($success) $success = false; 31 | echo "

Debe ingresar el nombre del procedimiento

"; 32 | } 33 | 34 | //El precio es obligatorio y debe ser numerico 35 | $price = trim($_POST['price']); 36 | if(strlen($price) < 1){ 37 | if($success) $success = false; 38 | echo "

Debe ingresar el precio del procedimiento

"; 39 | } 40 | else{ 41 | if(!is_numeric($price)){ 42 | if($success) $success = false; 43 | echo "

El precio del procedimiento debe ser un valor numérico

"; 44 | } 45 | } 46 | 47 | //El tipo de procedimiento es obligatorio 48 | if($_POST['proceduretype'] == 0){ 49 | if($success) $success = false; 50 | echo "

Debe ingresar el tipo de procedimiento

"; 51 | } 52 | 53 | //La descripcion debe ser menor de 300 caracteres 54 | if(strlen(trim($_POST['description'])) > 2000){ 55 | if($success) $success = false; 56 | echo '

La descripción debe ser menor de 2000 caracteres

'; 57 | } 58 | 59 | if($success) echo $success; 60 | ?> -------------------------------------------------------------------------------- /js/adddevelopment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | $('#date').datepicker({changeMonth:true,changeYear:true}); 5 | $('select[name="pregnant"]').change(function(){ 6 | if($('select[name="pregnant"]').val() == 0){ 7 | $('select[name="months"]').attr('disabled','disabled'); 8 | } 9 | else{ 10 | $('select[name="months"]').removeAttr('disabled'); 11 | } 12 | }); 13 | 14 | $('input:button').button().click(function(){ 15 | var $formdata = $('form').serialize(); 16 | $.post('modules/checkdevelopmentdata.php',$formdata,function(data){ 17 | if(data == '1'){ 18 | $.post('modules/adddevelopment.php',$formdata,function(value){ 19 | if(value == '1'){ 20 | $message.html('Nueva evolución registrada satisfactoriamente'); 21 | $message.dialog({ 22 | title:'success Registro satisfactorio', 23 | buttons:{ 24 | 'Historia Clinica':function(){window.location = 'medicalrecord.php?id=' + $('#patient').val();}, 25 | 'Datos Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 26 | 'Menu Principal':function(){window.location = 'menu.php';} 27 | } 28 | }); 29 | $message.dialog('open'); 30 | } 31 | else{ 32 | $message.html(value); 33 | $message.dialog({ 34 | title:'warning Error en el registro', 35 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 36 | }); 37 | $message.dialog('open'); 38 | } 39 | }); 40 | } 41 | else{ 42 | $message.html(data); 43 | $message.dialog({ 44 | title:'warning Error en los datos ingresados', 45 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 46 | }); 47 | $message.dialog('open'); 48 | } 49 | }); 50 | }); 51 | }); -------------------------------------------------------------------------------- /modules/checksubproceduredata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el código del subprocedimiento

"; 11 | } 12 | else{ 13 | $id = $handler->getSubprocedureId($code); 14 | if(isset($_POST['id'])){//Se esta modificando el procedimiento 15 | if($id != 0 && $id != $_POST['id']){ 16 | $success = false; 17 | echo '

Ya se encuentra registrado el código del subprocedimiento

'; 18 | } 19 | } 20 | else{//Se esta agregando el procedimiento 21 | if($id != 0){ 22 | if($success) $success = false; 23 | echo '

Ya se encuentra registrado el código del subprocedimiento

'; 24 | } 25 | } 26 | } 27 | 28 | //El nombre es obligatorio 29 | if(strlen(trim($_POST['name'])) < 1){ 30 | if($success) $success = false; 31 | echo "

Debe ingresar el nombre del subprocedimiento

"; 32 | } 33 | 34 | //El precio es obligatorio y debe ser numerico 35 | $price = trim($_POST['price']); 36 | if(strlen($price) < 1){ 37 | if($success) $success = false; 38 | echo "

Debe ingresar el precio del subprocedimiento

"; 39 | } 40 | else{ 41 | if(!is_numeric($price)){ 42 | if($success) $success = false; 43 | echo "

El precio del subprocedimiento debe ser un valor numérico

"; 44 | } 45 | } 46 | 47 | //El tipo de procedimiento es obligatorio 48 | if($_POST['procedure'] == 0){ 49 | if($success) $success = false; 50 | echo "

Debe ingresar el procedimiento al cual va a ser vinculado

"; 51 | } 52 | 53 | //La descripcion debe ser menor de 2000 caracteres 54 | if(strlen(trim($_POST['description'])) > 2000){ 55 | if($success) $success = false; 56 | echo '

La descripción debe ser menor de 2000 caracteres

'; 57 | } 58 | 59 | if($success) echo $success; 60 | ?> -------------------------------------------------------------------------------- /js/addappointment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#date').datepicker(); 3 | var $message = $('#message'); 4 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 5 | 6 | $('#search').button().click(function(){ 7 | var $formdata = $('form').serialize(); 8 | $.post('modules/showdentistday.php',$formdata,function(data){ 9 | $message.html(data); 10 | $message.dialog({ 11 | title:'success Horario por dia', 12 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 13 | }); 14 | $message.dialog('open'); 15 | }); 16 | }); 17 | 18 | $('#add').button().click(function(){ 19 | $('#loader').show(); 20 | $('#add').hide(); 21 | var $formdata = $('form').serialize(); 22 | $.post('modules/checkappointmentdata.php',$formdata,function(value){ 23 | if(value == '1'){ 24 | $.post('modules/addappointment.php',$formdata,function(data){ 25 | if(data == '1'){ 26 | $message.html('Cita agendada satisfactoriamente'); 27 | $message.dialog({ 28 | title:'success Registro satisfactorio', 29 | buttons:{ 30 | 'Volver al Paciente':function(){window.location = 'patient.php?id=' + $('#patient').val();}, 31 | 'Menu Principal':function(){window.location = 'menu.php';} 32 | } 33 | }); 34 | } 35 | else{ 36 | $message.html(data); 37 | $message.dialog({ 38 | title:'warning Error en el registro', 39 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 40 | }); 41 | } 42 | $message.dialog('open'); 43 | }); 44 | } 45 | else{ 46 | $message.html(value); 47 | $message.dialog({ 48 | title:'warning Error en los datos ingresados', 49 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 50 | }); 51 | $message.dialog('open'); 52 | } 53 | $('#loader').hide(); 54 | $('#add').show(); 55 | }); 56 | }); 57 | }); -------------------------------------------------------------------------------- /modules/addodontogram.php: -------------------------------------------------------------------------------- 1 | = 1;$i -= 1){ 22 | $tooth = 'd1' . $i; 23 | $insert .= ',`' . $tooth . '`'; 24 | $values .= ',"' . $_POST[$tooth] . '"'; 25 | } 26 | 27 | for($i = 1;$i <= 8;$i += 1){ 28 | $tooth = 'd2' . $i; 29 | $insert .= ',`' . $tooth . '`'; 30 | $values .= ',"' . $_POST[$tooth] . '"'; 31 | } 32 | 33 | for($i = 5;$i >= 1;$i -= 1){ 34 | $tooth = 'd5' . $i; 35 | $insert .= ',`' . $tooth . '`'; 36 | $values .= ',"' . $_POST[$tooth] . '"'; 37 | } 38 | 39 | for($i = 1;$i <= 5;$i += 1){ 40 | $tooth = 'd6' . $i; 41 | $insert .= ',`' . $tooth . '`'; 42 | $values .= ',"' . $_POST[$tooth] . '"'; 43 | } 44 | 45 | for($i = 5;$i >= 1;$i -= 1){ 46 | $tooth = 'd8' . $i; 47 | $insert .= ',`' . $tooth . '`'; 48 | $values .= ',"' . $_POST[$tooth] . '"'; 49 | } 50 | 51 | for($i = 1;$i <= 5;$i += 1){ 52 | $tooth = 'd7' . $i; 53 | $insert .= ',`' . $tooth . '`'; 54 | $values .= ',"' . $_POST[$tooth] . '"'; 55 | } 56 | 57 | for($i = 8;$i >= 1;$i -= 1){ 58 | $tooth = 'd4' . $i; 59 | $insert .= ',`' . $tooth . '`'; 60 | $values .= ',"' . $_POST[$tooth] . '"'; 61 | } 62 | 63 | for($i = 1;$i <= 8;$i += 1){ 64 | $tooth = 'd3' . $i; 65 | $insert .= ',`' . $tooth . '`'; 66 | $values .= ',"' . $_POST[$tooth] . '"'; 67 | } 68 | 69 | //Descripcion 70 | $description = trim($_POST['description']); 71 | if(strlen($description) > 0){ 72 | $insert .= ',`description`'; 73 | $values .= ',"' . $description . '"'; 74 | } 75 | 76 | $query = $insert . ') ' . $values . ')'; 77 | $handler = new DBHandler(); 78 | $success = $handler->executeQuery($query); 79 | if($success) echo $success; 80 | else echo $query; 81 | ?> -------------------------------------------------------------------------------- /console.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Consola de MySQL 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 35 | 36 |
37 |
38 | Consola de MySQL 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |
49 |
50 | 51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /modules/showdentistday.php: -------------------------------------------------------------------------------- 1 | getSchedule($_POST['dentist'],$date); 10 | if($schedule != null){ 11 | $time = mktime(0,0,0,$array[0],$array[1],$array[2]); 12 | $day = strtolower(date('l',$time)); 13 | if($schedule[$day] == true){ 14 | $t_init = $schedule[$day . 'init']; 15 | $t_end = $schedule[$day . 'end']; 16 | $j = $t_init; 17 | for($i = 0;$i <= ($t_end - $t_init);$i += 1){ 18 | $matrix[$i][0] = $j; 19 | $matrix[$i][1] = $handler->getHour($j); 20 | $matrix[$i][2] = 'Disponible'; 21 | $j += 1; 22 | } 23 | $count = $handler->getAppointmentCountByDateAndDentist($date,$_POST['dentist']); 24 | if($count > 0){ 25 | $list = $handler->getAppointmentListByDateAndDentist($date,$_POST['dentist']); 26 | for($i = 0;$i < $count;$i += 1){ 27 | for($j = $list[$i][4] - 1;$j < $list[$i][5] - 1;$j += 1){ 28 | if($list[$i][9] != 'can'){ 29 | $matrix[$j][2] = 'Cita: ' . $handler->getPatientName($list[$i][1]) . ''; 30 | } 31 | } 32 | } 33 | } 34 | ?> 35 |
36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 49 | 50 |
HoraDisponibilidad
51 |
52 | 56 |

El dentista no atiende el día solicitado

57 | 62 |

El dentista no tiene horario programado para la fecha solicitada

63 | 68 |

Debe seleccionar el dentista con quien desea programar la cita

69 | -------------------------------------------------------------------------------- /addbank.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Agregar Banco 17 | 18 | 19 | 20 | 21 | 22 | 23 | 36 |
37 |
38 | Agregar Banco 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |

49 | 50 | 51 |

52 |
53 |
54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /modules/addbudget.php: -------------------------------------------------------------------------------- 1 | 0){ 35 | $insert .= ',`description`'; 36 | $values .= ',"' . $description . '"'; 37 | } 38 | 39 | $query = $insert . ') ' . $values . ')'; 40 | $success = $Handler->executeQuery($query); 41 | 42 | if($success){ 43 | $budget = $Handler->getBudgetDataByCode($code); 44 | 45 | //Para cada uno de los 20 procedimientos disponibles 46 | for($i = 1;$i <= 20;$i += 1){ 47 | $procedure = 'procedure' . $i; 48 | $location = 'location' . $i; 49 | if($_POST[$procedure] > 0 && $_POST[$location] > 0){ 50 | 51 | $insert = 'INSERT INTO `dental`.`budgetinfo`('; 52 | $values = 'VALUES('; 53 | 54 | //Codigo del presupuesto 55 | $insert .= '`budget`'; 56 | $values .= '' . $budget['id'] . ''; 57 | 58 | //Codigo del presupuesto 59 | $insert .= ',`procedure`'; 60 | $values .= ',' . $_POST[$procedure] . ''; 61 | 62 | //Ubicacion 63 | $insert .= ',`location`'; 64 | $values .= ',' . $_POST[$location] . ''; 65 | 66 | $query = $insert . ') ' . $values . ')'; 67 | $success = $Handler->executeQuery($query); 68 | if(!$success){ 69 | echo $query; 70 | } 71 | } 72 | } 73 | } 74 | else{ 75 | echo $query; 76 | } 77 | 78 | if($success){ 79 | echo $success; 80 | } 81 | ?> -------------------------------------------------------------------------------- /modules/getodontogram.php: -------------------------------------------------------------------------------- 1 | getOdontogramData($_POST['id']); 9 | $userdata = $handler->getUserDataById($data['user']); 10 | } 11 | if($data != null){ 12 | $array = array( 13 | 'id' => $data['id'], 14 | 'patient' => $data['patient'], 15 | 'user' => $data['user'], 16 | 'username' => $userdata['firstname'] . ' ' . $userdata['firstlastname'] . ' ' . $userdata['secondlastname'], 17 | 'date' => toFormDate($data['date']), 18 | 19 | 'd18' => $data['d18'], 20 | 'd17' => $data['d17'], 21 | 'd16' => $data['d16'], 22 | 'd15' => $data['d15'], 23 | 'd14' => $data['d14'], 24 | 'd13' => $data['d13'], 25 | 'd12' => $data['d12'], 26 | 'd11' => $data['d11'], 27 | 28 | 'd21' => $data['d21'], 29 | 'd22' => $data['d22'], 30 | 'd23' => $data['d23'], 31 | 'd24' => $data['d24'], 32 | 'd25' => $data['d25'], 33 | 'd26' => $data['d26'], 34 | 'd27' => $data['d27'], 35 | 'd28' => $data['d28'], 36 | 37 | 'd55' => $data['d55'], 38 | 'd54' => $data['d54'], 39 | 'd53' => $data['d53'], 40 | 'd52' => $data['d52'], 41 | 'd51' => $data['d51'], 42 | 43 | 'd61' => $data['d61'], 44 | 'd62' => $data['d62'], 45 | 'd63' => $data['d63'], 46 | 'd64' => $data['d64'], 47 | 'd65' => $data['d65'], 48 | 49 | 'd85' => $data['d85'], 50 | 'd84' => $data['d84'], 51 | 'd83' => $data['d83'], 52 | 'd82' => $data['d82'], 53 | 'd81' => $data['d81'], 54 | 55 | 'd71' => $data['d71'], 56 | 'd72' => $data['d72'], 57 | 'd73' => $data['d73'], 58 | 'd74' => $data['d74'], 59 | 'd75' => $data['d75'], 60 | 61 | 'd48' => $data['d48'], 62 | 'd47' => $data['d47'], 63 | 'd46' => $data['d46'], 64 | 'd45' => $data['d45'], 65 | 'd44' => $data['d44'], 66 | 'd43' => $data['d43'], 67 | 'd42' => $data['d42'], 68 | 'd41' => $data['d41'], 69 | 70 | 'd31' => $data['d31'], 71 | 'd32' => $data['d32'], 72 | 'd33' => $data['d33'], 73 | 'd34' => $data['d34'], 74 | 'd35' => $data['d35'], 75 | 'd36' => $data['d36'], 76 | 'd37' => $data['d37'], 77 | 'd38' => $data['d38'], 78 | 79 | 'description' => $data['description'] 80 | ); 81 | } 82 | echo json_encode($array); 83 | ?> -------------------------------------------------------------------------------- /addpaymenttype.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Agregar Forma de Pago 17 | 18 | 19 | 20 | 21 | 22 | 23 | 36 |
37 |
38 | Agregar Forma de Pago 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |

49 | 50 | 51 |

52 |
53 |
54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /addproceduretype.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Agregar Tipo de Procedimiento 17 | 18 | 19 | 20 | 21 | 22 | 23 | 36 |
37 |
38 | Agregar Tipo de Procedimiento 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |

49 | 50 | 51 |

52 |
53 |
54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /modules/getfeereport.php: -------------------------------------------------------------------------------- 1 | getFeeReportCount($init,$end); 14 | if($count > 0){ 15 | $list = $handler->getFeeReportList($init,$end); 16 | } 17 | } 18 | else{ 19 | $count = $handler->getFeeReportCountByDentist($init,$end,$user); 20 | if($count > 0){ 21 | $list = $handler->getFeeReportListByDentist($init,$end,$user); 22 | } 23 | } 24 | if($count > 0){ 25 | $total = 0; 26 | $feetotal = 0; 27 | ?> 28 | 29 | 30 | 31 | getBudgetDataById($list[$i][1]); 34 | $subprocedure = $handler->getSubprocedureData($list[$i][4]); 35 | $userdata = $handler->getUserDataById($list[$i][6]); 36 | $specialtydata = $handler->getSpecialtyData($userdata[17]); 37 | $total += $subprocedure[3]; 38 | $fee = $subprocedure[3] * $specialtydata[2]; 39 | $feetotal += $fee; 40 | ?> 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 |
FechaUsuarioPacienteSubprocedimientoValor ProcHonorario
getUserName($list[$i][6]);?>getPatientName($budgetdata['patient']);?>getSubprocedureName($list[$i][4]);?>$$
54 |

Valor total de los subprpcedimientos: $

55 |

Valor total honorarios: $

56 | 60 |

No hay subprocedimientos registrados durante las fechas indicadas

61 | -------------------------------------------------------------------------------- /modules/getuserslist.php: -------------------------------------------------------------------------------- 1 | getConditionedUserCount($where); 44 | $body = ''; 45 | if($total > 0){ 46 | ?> 47 |

Lista de Usuarios

48 |
49 | 50 | 51 | 52 | 53 | 54 | getConditionedUserList($where); 56 | for($i = 0;$i < $total;$i += 1){ 57 | ?> 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 70 | 71 |
Primer NombrePrimer ApellidoSegundo ApellidoSexoTipo de DocumentoNúmero de DocumentoVer
Ver Usuario
72 | 76 |

No hay resultados con los parámetros indicados

77 | -------------------------------------------------------------------------------- /modules/getpatientslist.php: -------------------------------------------------------------------------------- 1 | getConditionedPatientCount($where); 44 | $body = ''; 45 | if($total > 0){ 46 | ?> 47 |

Lista de Pacientes

48 |
49 | 50 | 51 | 52 | 53 | 54 | getConditionedPatientList($where); 56 | for($i = 0;$i < $total;$i += 1){ 57 | ?> 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 70 | 71 |
Primer NombrePrimer ApellidoSegundo ApellidoSexoTipo de DocumentoNúmero de DocumentoVer
Ver Paciente
72 | 76 |

No hay resultados con los parámetros indicados

77 | -------------------------------------------------------------------------------- /addspecialty.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Agregar Especialidad 17 | 18 | 19 | 20 | 21 | 22 | 23 | 36 |
37 |
38 | Agregar Especialidad 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 | Formato decimal: 0.5 48 |

49 |

50 | 51 | 52 |

53 |

54 | 55 | 56 |

57 |
58 |
59 | 60 |
61 | 62 | -------------------------------------------------------------------------------- /addlocation.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Agregar Ubicación Oral 17 | 18 | 19 | 20 | 21 | 22 | 23 | 36 |
37 |
38 | Agregar Ubicación Oral 39 |
40 |

41 | 42 | 43 |

44 |

45 | 46 | 47 |

48 |

49 | 50 | 51 |

52 |

53 | 54 | 55 |

56 |
57 |
58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /appointmentreport.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | Dental: Reporte de Citas 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 36 |
37 |
38 | Reporte de Citas 39 |
40 |

41 | 42 | 43 | mm/dd/aaaa 44 |

45 |

46 | 47 | 48 |

49 |

50 | 51 | 52 |

53 |
54 |
55 | 56 | 57 |
58 | 59 | -------------------------------------------------------------------------------- /modules/addhistory.php: -------------------------------------------------------------------------------- 1 | executeQuery($query); 69 | if($success) echo $success; 70 | else echo $query; 71 | ?> -------------------------------------------------------------------------------- /paymentreport.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | Dental: Reporte de Recaudos 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 35 |
36 |
37 | Reporte de Recaudos 38 |
39 |

40 | 41 | 42 |

43 |

44 | 45 | 46 |

47 |

48 | 49 | 50 |

51 |
52 |
53 | 54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /modules/modifybudgetinfo.php: -------------------------------------------------------------------------------- 1 | 0){ 10 | $update .= ',`description` = "' . $description . '"'; 11 | } 12 | else{ 13 | $update .= ',`description` = NULL'; 14 | } 15 | $update .= ' WHERE `id` = ' . $_POST['id'] . ''; 16 | $success = $handler->executeQuery($update); 17 | if(!$success) echo $update; 18 | 19 | $oldinfocount = $handler->getBudgetInfoCount($_POST['id']); 20 | $oldinfolist = $handler->getBudgetInfoList($_POST['id']); 21 | $newinfocount = 0; 22 | $newinfolist = null; 23 | 24 | //Para cada uno de los 20 procedimientos disponibles en el formulario 25 | for($i = 1;$i <= 20;$i += 1){ 26 | $procedure = 'procedure' . $i; 27 | $location = 'location' . $i; 28 | if($_POST[$procedure] > 0 && $_POST[$location] > 0){ 29 | $newinfolist[$newinfocount][0] = $_POST[$procedure]; 30 | $newinfolist[$newinfocount][1] = $_POST[$location]; 31 | $newinfocount += 1; 32 | } 33 | } 34 | 35 | $index = 0; 36 | 37 | //Se reemplaza cada procedimiento anterior con uno nuevo, hasta que se llegue al numero de 38 | while($index < $oldinfocount && $index < $newinfocount){ 39 | $update = 'UPDATE `dental`.`budgetinfo` SET '; 40 | $update .= '`procedure` = ' . $newinfolist[$index][0] . ''; 41 | $update .= ',`location` = ' . $newinfolist[$index][1] . ''; 42 | $update .= ' WHERE `id` = ' . $oldinfolist[$index][0] . ';'; 43 | $success = $handler->executeQuery($update); 44 | if(!$success){ 45 | echo $update; 46 | } 47 | $index += 1; 48 | } 49 | 50 | if($index < $oldinfocount){ 51 | while($index < $oldinfocount){ 52 | $delete = 'DELETE FROM `dental`.`budgetinfo` WHERE `id` = ' . $oldinfolist[$index][0] . ''; 53 | $success = $handler->executeQuery($delete); 54 | if(!$success){ 55 | echo $delete; 56 | } 57 | $index += 1; 58 | } 59 | } 60 | else{ 61 | if($index < $newinfocount){ 62 | while($index < $newinfocount){ 63 | $insert = 'INSERT INTO `dental`.`budgetinfo`(`budget`,`procedure`,`location`)'; 64 | $insert .= ' VALUES(' . $_POST['id'] . ',' . $newinfolist[$index][0] . ',' . $newinfolist[$index][1] . ')'; 65 | $success = $handler->executeQuery($insert); 66 | if(!$success){ 67 | echo $$insert; 68 | } 69 | $index += 1; 70 | } 71 | } 72 | } 73 | 74 | echo $success; 75 | ?> -------------------------------------------------------------------------------- /feereport.php: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 18 | Dental: Reporte de Honorarios 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 35 |
36 |
37 | Reporte de Honorarios 38 |
39 |

40 | 41 | 42 |

43 |

44 | 45 | 46 |

47 |

48 | 49 | 50 |

51 |

52 | 53 | 54 |

55 |
56 |
57 | 58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /modules/gethistory.php: -------------------------------------------------------------------------------- 1 | getHistory($_POST['id']); 9 | $userdata = $handler->getUserDataById($data['user']); 10 | } 11 | if($data != null){ 12 | $array = array( 13 | 'id' => $data['id'], 14 | 'patient' => $data['patient'], 15 | 'user' => $data['user'], 16 | 'username' => $userdata['firstname'] . ' ' . $userdata['firstlastname'] . ' ' . $userdata['secondlastname'], 17 | 'date' => toFormDate($data['date']), 18 | 'history' => $data['history'], 19 | 'historydesc1' => $data['historydesc1'], 20 | 'historydesc2' => $data['historydesc2'], 21 | 'historydesc3' => $data['historydesc3'], 22 | 'historydesc4' => $data['historydesc4'], 23 | 'historydesc5' => $data['historydesc5'], 24 | 'historydesc6' => $data['historydesc6'], 25 | 'historydesc7' => $data['historydesc7'], 26 | 'historydesc8' => $data['historydesc8'], 27 | 'historydesc9' => $data['historydesc9'], 28 | 'historydesc10' => $data['historydesc10'], 29 | 'historydesc11' => $data['historydesc11'], 30 | 'historydesc12' => $data['historydesc12'], 31 | 'historydesc13' => $data['historydesc13'], 32 | 'historydesc14' => $data['historydesc14'], 33 | 'historydesc15' => $data['historydesc15'], 34 | 'historydesc16' => $data['historydesc16'], 35 | 'historydesc17' => $data['historydesc17'], 36 | 'historydesc18' => $data['historydesc18'], 37 | 'historydesc19' => $data['historydesc19'], 38 | 'test' => $data['test'], 39 | 'testdesc1' => $data['testdesc1'], 40 | 'testdesc2' => $data['testdesc2'], 41 | 'testdesc3' => $data['testdesc3'], 42 | 'testdesc4' => $data['testdesc4'], 43 | 'testdesc5' => $data['testdesc5'], 44 | 'testdesc6' => $data['testdesc6'], 45 | 'testdesc7' => $data['testdesc7'], 46 | 'testdesc8' => $data['testdesc8'], 47 | 'testdesc9' => $data['testdesc9'], 48 | 'testdesc10' => $data['testdesc10'], 49 | 'testdesc11' => $data['testdesc11'], 50 | 'testdesc12' => $data['testdesc12'], 51 | 'testdesc13' => $data['testdesc13'], 52 | 'testdesc14' => $data['testdesc14'], 53 | 'testdesc15' => $data['testdesc15'], 54 | 'testdesc16' => $data['testdesc16'], 55 | 'testdesc17' => $data['testdesc17'], 56 | 'testdesc18' => $data['testdesc18'], 57 | 'testdesc19' => $data['testdesc19'], 58 | 'testdesc20' => $data['testdesc20'], 59 | 'testdesc21' => $data['testdesc21'], 60 | 'plaque' => $data['plaque'], 61 | 'lastvisit' => $data['lastvisit'], 62 | 'origin' => $data['origin'], 63 | 'originhistory' => $data['originhistory'], 64 | 'background' => $data['background'] 65 | ); 66 | } 67 | echo json_encode($array); 68 | ?> -------------------------------------------------------------------------------- /modules/modifyuser.php: -------------------------------------------------------------------------------- 1 | 0){ 19 | $update .= ',`middlename` = "' . trim($_POST['middlename']) . '"'; 20 | } 21 | else{ 22 | $update .= ',`middlename` = NULL'; 23 | } 24 | 25 | //Primer apellido 26 | $update .= ',`firstlastname` = "' . trim($_POST['firstlastname']) . '"'; 27 | 28 | //Segundo apellido 29 | $update .= ',`secondlastname` = "' . trim($_POST['secondlastname']) . '"'; 30 | 31 | //Numero de documento de identidad 32 | $update .= ',`sex` = ' . $_POST['sex']; 33 | 34 | //Fecha de nacimiento 35 | $date = splitDate(trim($_POST['birthdate'])); 36 | $update .= ',`birthdate` = "' . $date[2] . '-' . $date[0] . '-' . $date[1] . '"'; 37 | 38 | //Tipo de sangre 39 | $update .= ',`bloodtype` = ' . $_POST['bloodtype']; 40 | 41 | //Direccion 42 | $update .= ',`address` = "' . trim($_POST['address']) . '"'; 43 | 44 | //Telefono fijo 45 | $update .= ',`phonehome` = "' . trim($_POST['phonehome']) . '"'; 46 | 47 | //Telefono oficina 48 | if(strlen(trim($_POST['phoneoffice'])) > 0){ 49 | $update .= ',`phoneoffice` = "' . trim($_POST['phoneoffice']) . '"'; 50 | } 51 | else{ 52 | $update .= ',`phoneoffice` = NULL'; 53 | } 54 | 55 | //Celular 56 | if(strlen(trim($_POST['cellnumber'])) > 0){ 57 | $update .= ',`cellnumber` = "' . trim($_POST['cellnumber']) . '"'; 58 | } 59 | else{ 60 | $update .= ',`cellnumber` = NULL'; 61 | } 62 | 63 | //Correo electronico 64 | if(strlen(trim($_POST['email'])) > 0){ 65 | $update .= ',`email` = "' . trim($_POST['email']) . '"'; 66 | } 67 | else{ 68 | $update .= ',`email` = NULL'; 69 | } 70 | 71 | //Estado civil 72 | $update .= ',`maritalstatus` = ' . $_POST['maritalstatus']; 73 | 74 | //Dentista 75 | $update .= ',`dentist` = ' . $_POST['dentist']; 76 | 77 | //Especialidad 78 | if($_POST['dentist'] == 1){ 79 | $update .= ',`specialty` = ' . $_POST['specialty']; 80 | } 81 | else{ 82 | $update .= ',`specialty` = NULL'; 83 | } 84 | 85 | //Nombre de usuario 86 | $update .= ',`username` = "' . trim($_POST['username']) . '"'; 87 | 88 | //Privilegios 89 | $update .= ',`privileges` = ' . $_POST['privileges']; 90 | 91 | $update .= ' WHERE id = ' . $_POST['id']; 92 | 93 | $success = $Handler->executeQuery($update); 94 | echo $success; 95 | ?> -------------------------------------------------------------------------------- /loadpatient.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Dental: Cargar Paciente 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 37 | 38 |
39 |
40 | Cargar Paciente 41 |
42 |

43 | 44 | 51 |

52 |

53 | 54 | 55 |

56 |

57 | 58 | 59 |

60 |
61 |
62 | 63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /js/modifybank.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var $message = $('#message'); 3 | $message.dialog({autoOpen:false,closeOnEscape:false,modal:true,resizable:false,width:600}); 4 | 5 | $('#searchbutton').button().click(function(){ 6 | var $formdata = $('#searchform').serialize(); 7 | $('#searchbutton').hide(); 8 | $('#searchloader').show(); 9 | $('#modifycontainer').slideUp(1000,function(){ 10 | $.post('modules/checkbank.php',$formdata,function(value){ 11 | if(value == '1'){ 12 | $.post('modules/getbankdata.php',$formdata,function(data){ 13 | $(':text[name="id"]').val(data.id); 14 | $(':text[name="name"]').val(data.name); 15 | $('textarea[name="description"]').val(data.description); 16 | },'json'); 17 | $('#modifycontainer').slideDown(1000,function(){ 18 | $('#searchbutton').show(); 19 | $('#searchloader').hide(); 20 | }); 21 | } 22 | else{ 23 | $message.html('Los datos ingresados no corresponden a ningun banco'); 24 | $message.dialog({ 25 | title:'warning Registro inválido', 26 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 27 | }); 28 | $message.dialog('open'); 29 | $('#searchbutton').show(); 30 | $('#searchloader').hide(); 31 | } 32 | }); 33 | }); 34 | }); 35 | 36 | $('#modifybutton').button().click(function(){ 37 | var $formdata = $('#modifyform').serialize(); 38 | $('#modifyloader').show(); 39 | $('#modifybutton').hide(); 40 | $.post('modules/checkbankdata.php',$formdata,function(value){ 41 | if(value == '1'){ 42 | $.post('modules/modifybank.php',$formdata,function(data){ 43 | if(data == '1'){ 44 | $message.html('Banco modificado satisfactoriamente'); 45 | $message.dialog({ 46 | title:'success Modificación satisfactoria', 47 | buttons:{ 48 | 'Modificar Banco':function(){window.location = 'modifybank.php';}, 49 | 'Menu Principal':function(){window.location = 'menu.php';} 50 | } 51 | }); 52 | } 53 | else{ 54 | $message.html(data); 55 | $message.dialog({ 56 | title:'warning Error de modificación', 57 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 58 | }); 59 | } 60 | $message.dialog('open'); 61 | }); 62 | } 63 | else{ 64 | $message.html(value); 65 | $message.dialog({ 66 | title:'warning Error de datos', 67 | buttons:{'Aceptar':function(){$(this).dialog('close');}} 68 | }); 69 | $message.dialog('open'); 70 | } 71 | }); 72 | $('#modifyloader').hide(); 73 | $('#modifybutton').show(); 74 | }); 75 | 76 | }); -------------------------------------------------------------------------------- /modules/modifypatient.php: -------------------------------------------------------------------------------- 1 | 0){ 19 | $update .= ',`middlename` = "' . trim($_POST['middlename']) . '"'; 20 | } 21 | else{ 22 | $update .= ',`middlename` = NULL'; 23 | } 24 | 25 | //Primer apellido 26 | $update .= ',`firstlastname` = "' . trim($_POST['firstlastname']) . '"'; 27 | 28 | //Segundo apellido 29 | $update .= ',`secondlastname` = "' . trim($_POST['secondlastname']) . '"'; 30 | 31 | //Numero de documento de identidad 32 | $update .= ',`sex` = ' . $_POST['sex']; 33 | 34 | //Fecha de nacimiento 35 | $date = splitDate(trim($_POST['birthdate'])); 36 | $update .= ',`birthdate` = "' . $date[2] . '-' . $date[0] . '-' . $date[1] . '"'; 37 | 38 | //Tipo de sangre 39 | $update .= ',`bloodtype` = ' . $_POST['bloodtype']; 40 | 41 | //Direccion 42 | $update .= ',`address` = "' . trim($_POST['address']) . '"'; 43 | 44 | //Telefono fijo 45 | $update .= ',`phonehome` = "' . trim($_POST['phonehome']) . '"'; 46 | 47 | //Telefono oficina 48 | if(strlen(trim($_POST['phoneoffice'])) > 0){ 49 | $update .= ',`phoneoffice` = "' . trim($_POST['phoneoffice']) . '"'; 50 | } 51 | else{ 52 | $update .= ',`phoneoffice` = NULL'; 53 | } 54 | 55 | //Celular 56 | if(strlen(trim($_POST['cellnumber'])) > 0){ 57 | $update .= ',`cellnumber` = "' . trim($_POST['cellnumber']) . '"'; 58 | } 59 | else{ 60 | $update .= ',`cellnumber` = NULL'; 61 | } 62 | 63 | //Correo electronico 64 | if(strlen(trim($_POST['email'])) > 0){ 65 | $update .= ',`email` = "' . trim($_POST['email']) . '"'; 66 | } 67 | else{ 68 | $update .= ',`email` = NULL'; 69 | } 70 | 71 | //Estado civil 72 | $update .= ',`maritalstatus` = ' . $_POST['maritalstatus']; 73 | 74 | //Ocupacion 75 | $update .= ',`occupation` = "' . trim($_POST['occupation']) . '"'; 76 | 77 | //Acudiente 78 | if(strlen(trim($_POST['contact'])) > 0){ 79 | $update .= ',`contact` = "' . trim($_POST['contact']) . '"'; 80 | } 81 | else{ 82 | $update .= ',`contact` = "---"'; 83 | } 84 | 85 | //Numero Acudiente 86 | if(strlen(trim($_POST['contactnumber'])) > 0){ 87 | $update .= ',`contactnumber` = "' . trim($_POST['contactnumber']) . '"'; 88 | } 89 | else{ 90 | $update .= ',`contactnumber` = "---"'; 91 | } 92 | 93 | $update .= ' WHERE id = ' . $_POST['id']; 94 | 95 | $success = $Handler->executeQuery($update); 96 | 97 | echo $success; 98 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DentalRegistry 2 | 3 | A data-management system for dental clinics. Keeps record of patients, appointments, treatments, procedures and budgets. 4 | 5 | This was a simple but working software for a dental clinic. It was made on request, no standards for customer dental records (if any) were followed. 6 | 7 | ## Some notes about this project 8 | 9 | This is an old project I was working on for some local small businesses in the area. It was custom-made software; so, many things regarding dental businesses management, patient records and stuff was (and still is) unknown to me. I stopped giving assistance to this project due to other obligations. 10 | 11 | Approach the code in the following way: 12 | 13 | 1. Every php file in the main folder is a page with an specific functionality in the system. I tried to name them according to their respective task. 14 | 2. Every php file in the main folder has an associate js file in the js folder. The reason is I wanted to do communication with the DB using Ajax. 15 | 3. Concerning DB communication. All the transactions logic is in the modules/dbhandler.php file. My approach was to group all the required queries to the database in a single file, such that modifications are only done in one place instead of looking through all the php files. 16 | 4. In modules/function.php there are plenty of common functions to all modules. It was the same logic as in modules/dbhandler.php 17 | 5. The version I posted in github is the generic version. I did some other versions based on this one with more functionalities and different DB transaction approaches. Unfortunately I lost the code of those versions. I could save the very initial one. 18 | 19 | For sure there are better ways for doing this kind of applications. I coded this during the years when the combination Apache+MySQL+PHP has a hit and Ajax was getting stronger (around 2012). 20 | 21 | Hope it helps. 22 | 23 | ## Login and Credentials 24 | 25 | Since it is the generic version of a custom-made application, the login and credentials changed from implementation to implementation (I know it is not the best way, even a way for doing that). In short, you will need to add the admin user manually in a query like thi: 26 | 27 | ```SQL 28 | INSERT INTO sonri-citas.user ( 29 | firstname, 30 | middlename, 31 | firstlastname, 32 | secondlastname, 33 | sex, 34 | documenttype, 35 | documentnumber, 36 | birthdate, 37 | address, 38 | phonehome, 39 | maritalstatus, 40 | username, 41 | password, 42 | privileges) 43 | VALUES ( 44 | "admin", 45 | "admin", 46 | "admin", 47 | "admin", 48 | 1, 49 | 1, 50 | 12345, 51 | "01/01/2000", 52 | "address", 53 | "000-000-000", 54 | 1, 55 | "admin", 56 | "adminpassword", 57 | 4); 58 | ``` 59 | 60 | Again, not the best way. From this code other versions were made. 61 | -------------------------------------------------------------------------------- /modules/checkpatientdata.php: -------------------------------------------------------------------------------- 1 | Debe ingresar el número del documento de identificación

"; 11 | } 12 | else{ 13 | if(!is_numeric($documentnumber)){ 14 | if($success) $success = false; 15 | echo "

Valor del número del documento de identificación inválido

"; 16 | } 17 | else{ 18 | $handler = new DBHandler(); 19 | $id = $handler->getPatientId($_POST['documenttype'],$documentnumber); 20 | if(isset($_POST['id'])){ //Se esta modificando el paciente 21 | if($id != 0 && $id != $_POST['id']){ 22 | $success = false; 23 | echo '

Ya se encuentra registrado el documento de identidad

'; 24 | } 25 | } 26 | else{ //Se esta agregando un nuevo paciente 27 | if($id != 0){ 28 | if($success) $success = false; 29 | echo '

Ya se encuentra registrado el documento de identidad

'; 30 | } 31 | } 32 | } 33 | } 34 | 35 | //El primer nombre es obligatorio 36 | if(strlen(trim($_POST['firstname'])) < 1){ 37 | if($success) $success = false; 38 | echo "

Debe ingresar el primer nombre

"; 39 | } 40 | 41 | //El primer apellido es obligatorio 42 | if(strlen(trim($_POST['firstlastname'])) < 1){ 43 | if($success) $success = false; 44 | echo "

Debe ingresar el primer apellido

"; 45 | } 46 | 47 | //El segundo apellido es obligatorio 48 | if(strlen(trim($_POST['secondlastname'])) < 1){ 49 | if($success) $success = false; 50 | echo "

Debe ingresar el segundo apellido

"; 51 | } 52 | 53 | //La fecha es obligatoria y con el formato mm/dd/aaaa 54 | $date = trim($_POST['birthdate']); 55 | if(strlen($date) < 1){ 56 | if($success) $success = false; 57 | echo "

Debe ingresar la fecha de nacimiento

"; 58 | } 59 | else{ 60 | $array = splitDate($date); 61 | if(!(sizeof($array) == 3 && is_numeric($array[0]) && is_numeric($array[1]) && is_numeric($array[2]))){ 62 | if($success) $success = false; 63 | echo '

Formato inválido de la fecha de nacimiento

'; 64 | } 65 | else{ 66 | if(!checkdate($array[0],$array[1],$array[2])){ 67 | if($success) $success = false; 68 | echo '

La fecha ingresada no existe

'; 69 | } 70 | } 71 | } 72 | 73 | //La direccion es obligatoria 74 | if(strlen(trim($_POST['address'])) < 1){ 75 | if($success) $success = false; 76 | echo "

Debe ingresar la dirección

"; 77 | } 78 | 79 | //El telefono de la casa es obligatorio 80 | if(strlen(trim($_POST['phonehome'])) < 1){ 81 | if($success) $success = false; 82 | echo "

Debe ingresar el teléfono

"; 83 | } 84 | 85 | if($success) echo $success; 86 | ?> --------------------------------------------------------------------------------