I am a newbie to RoR
I have this problem which I will represent in psuedocode - it
describes the allocation of a randomisation number to a patient
participating in a clinical trial at a particular hospital site.
- User (Doctor) logs on on with username: JBLOGGS
- Based on his username - system returns him a dropdownlist of
SITE_ID’s that he has access to (previously set up in a database table
eg. USER_SITES (SITE_ID, USERNAME) - - User selects a site available to him. eg 90001
- User enters INITIALS of patient
- User press SUBMITT button
- The system will get the next available RANDOMISATION record
(retrieved in ascending order of the RAND_SEQ number) which has a
unique RAND_NUMBER and DRUG_KIT_NUMBER. - The inputed INITIALS will be updated in RANDOMISATION record,
similarly the CREATED_BY and CREATED_DATE fields - System returns a screen containing USERNAME, SITE_ID, INITIALS,
RAND_NUMBER, DRUG_KIT_NUMBER to the User - this information will be
recorded in patient notes on another system.
Assumptions:
- If the SITE_ID and INITIALS field if not null - then the
RANDOMISATION record is used already and not available.
TABLE STRUCTURES:
USER_SITES (SITE_ID, USERNAME);
RANDOMISATION (RAND_SEQ, RAND_NUMBER, DRUG_KIT_NUMBER, SITE_ID,
INITIALS, CREATED_BY, CREATED_DATE);
If anyone can assist me in anyway - I would be most grateful.
Kind Regards from DownUnder (New Zealand)
Mervyn