I hope my answer points you in the right direction. I would create 2 (generic) tables one that is called something like test_definition, since you have a wide variety of tests.
And then create a table called test results. The forms that the user fills in would be created dynamically through the view by extracting the appropriate row information from the test_definition table. Reports results can be created by joining the test_definition table with the test_results table. The test_results table would be appear to be genric, ie column_A, Column_B. but pull the required metadata from the test_definition field. Hence you would only need 2 models On Sunday, June 3, 2012 4:02:33 AM UTC-4, Kalpa Welivitigoda wrote: > > Hi, > > I want to develop a web based laboratory test reporting system. It > basically involves storing the records of different tests for > different patient and get a print out of the reports. There are around > 100 tests with different fields. > > The flow would be that the user enters a patient id and the tests for > that person appears, then he selects one test and a input form appears > to enter test results. This continues for the other tests as well and > finally a print out is issued and a pdf of the report is generated on > request. > > Since there are around 100 tests (with different fields), do I need to > write separate models and views (to view the data input form) for each > and every one of them or can it be made simpler at least generating > views (because views are generated from some of the fields in the > model) ? > > -- > Best Regards, > > Kalpa Pathum Welivitigoda > http://about.me/callkalpa > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/2gngiSyXXXoJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.