This content has been marked as final. Show 15 replies
Hope you already have a table with patient details and another one with test details.
Create a table which stores patient test details, for each test a patient takes you can stores the id of the patient and id of the test. so each time a patient takes a test you will insert one record in this table with patient id and test id.
thanks , but unfortunately , you did not get me ,
this is the same situation here , inserting one id the same as inserting one test name ,
i do not want to insert one test , i want to insert multiple tests to one patient ,
what you've said is insert one id to one patient , this is the same .
thanks for your prompt reply , but please provide me with another help
Yoounus is right, you should create a detailtable for the tests on one patient. Putting detail information into one field will only cause trouble. If you really want to have it as one column in your table, you can use a nested table, but in fact its the same thing just in other terms, and more complicated to use in most cases.
If you have a one table for patients and one for tests, create a third table patient_test, which only holds the valid combination of tests and patients (which patient has done which test).
so you would have tables like
CREATE TABLE TEST ( ID NUMBER NOT NULL, as primary key NAME VARCHAR2(80) ); CREATE TABLE PATIENT ( ID NUMBER NOT NULL, as primary key NAME VARCHAR2(80) ); CREATE TABLE PATIENT_TESTS ( ID NUMBER NOT NULL, as primary key PATIENT_ID NUMBER NOT NULL, as fk to patient (ID) TEST_ID NUMBER NOT NULL as fk to test (ID) );
See the post by Andreas, is it not very clear?
What are the tables you have already?
Basically you should have a table for pateints which will have information pertaining to patients. Another one for test details which will have info about each tests you have in your hospital
The third one to store details of each tests taken by a patient, you can save patientid from patients table and testid from test table and if you want some other info that also. So each time a patient takes a test you will have patient id and test id inserted into this table.
hi yoonus , to clear the whole issue ,
i have a table named (patients) , it is dedicated to insert patients data , when they come to the hospital to do a test .
some of these table are (patient_id as primary-key , patient_name , test(the test he will do) , there is a block in my application represents this table in which i will insert patients' data .
the problem is any patient come to the hospital may perform more than one test , so how can i insert these tests , and
assign them to this specific patient , and which item will i use to insert these multiple tests (text item , t-list , .... or what)
this the first problem , let us solve it first , and the speech has a rest
thanks in advance
I don't understand your question. You insert the data as in any other table, either by using INSERT or by creating a datablock in forms.
I'd say you have two block, PATIENTS is the master-block, PATIENT_TESTS is the detail-block, the PATIENTS-block has a relation to the PATIENT_TESTS-block. In the PATIENT_TEST-block, you have a lookup using a lov to select the appropiate record from TEST.
i've a problem about analysis issue , so i searched for another solution , and i want to know , if there is a problem
to use this solution or not ?
i thought of adding 7 or 8 columns for tests in the patients table as follows :
test1 , test2 , test3 , .......
the first for the first test , the second for the second test , ............
and each column of them represents a field in my form , all of them are invisible except test1 , and if patient needs to
do another test , i'll show the test2's field , and so on .
is there something wrong with this solution ?