DATABASE SYSTEMS Create 2 PHP web page One when you input information ( name of
ID: 3573256 • Letter: D
Question
DATABASE SYSTEMS
Create 2 PHP web page One when you input information ( name of medication, amount given, and ID) and one that prints out all information in table form)
- Medication webpage that will have the functions of updating the inventory count of the medications/treatments and also have a way to display total amount of medications on hand.
Queries that are apart of database that can be used for reference when creating web page above
(* have to be on seperate pages, the rest just what ever makes sense)
*Add a new patient
*Add a new medication/treatment
*List all patients
- sort paitents by somthing
Update inventory count for medications/treatments
Delete a patient from the database
Display total amount of medications on hand - aggregate
Display patient with medications and treatments applied to them
Explanation / Answer
/* create user */
create user pis identified by pis;
grant connect, resource to pis;
connect pis/pis;
/* create tables */
create table patients
( pid number(5) primary key,
name varchar(50) not null,
dob date,
gender char(1),
contactno varchar(20),
complaints varchar(200),
mrvid number(5),
referedby varchar(50)
);
create table visits
( vid number(5) primary key,
pid number(5) references patients(pid),
visitdate date,
complaint varchar(200)
);
alter table patients
add ( foreign key(mrvid)
references visits(vid) ) ;
create table drugs
( vid number(5) references visits(vid),
drugname varchar(30),
dosage varchar(20),
nodays number(2),
primary key( vid,drugname)
);
create table tests
( vid number(5) references visits(vid),
testname varchar(30),
testdate date,
result varchar(200),
primary key( vid,testname)
);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.