Merge and aggregate datasets: Difference between revisions

Content added Content deleted
Line 811: Line 811:
SET DATE FORMAT "yyyy-mm-dd"
SET DATE FORMAT "yyyy-mm-dd"


&& create and population the patient table
&& create and populate the patient table
pStruct := {{"patient_id", "n", 8, 0}, {"lastname", "c", 10, 0 }}
pStruct := {{"patient_id", "n", 8, 0}, {"lastname", "c", 10, 0 }}
dbCreate( "patient", pStruct,, .T., "patient" )
dbCreate( "patient", pStruct,, .T., "patient" )
Line 820: Line 820:
INSERT INTO patient (patient_id, lastname) VALUES (5005, "Kurtz")
INSERT INTO patient (patient_id, lastname) VALUES (5005, "Kurtz")
&& create and population the visit table
&& create and populate the visit table
vStruct := {{"patient_id", "n", 8, 0}, {"visit_date", "d", 10, 0}, {"score", "n", 8, 1}}
vStruct := {{"patient_id", "n", 8, 0}, {"visit_date", "d", 10, 0}, {"score", "n", 8, 1}}
dbCreate( "visit", vStruct,, .T., "visit" )
dbCreate( "visit", vStruct,, .T., "visit" )