July 17, 2012 at 11:25 pm
Database : SQL Server 2000
OS : windows Server 2003
Application : VB6
One client machine is running on a hospital's reception counter which generates bills and different papers for the patients. This hospital provides free OPD (Out-door Patient) services for 8.30 AM to 9.30 AM daily; means any patient of any department will be freely attended by doctors for the free OPD hours daily.
If patient first time visit then counter will generate "OPD Case Paper" in which all required detals will be printed. If it is between 8.30 to 9.30 AM then amount will be zero, otherwise respective charges will be on the bill. If patient revisit the hospital then counter will generated "Renewal OPD Case Paper".
Now, if patient revisit between 8.30 to 9.30 AM then paper's caption should be "Free Renewal OPD Case Paper" with zero amount, else paper's caption should be "Renewal OPD Case Paper" with respective charges. How to do this task ? Suppose this can be achieved by playing around date and time function, but what if there some issue happened with either server or client machine in between 8.30 to 9.30 AM ? In that case free hours should be increased with adding the downtime, because hospital provides 1 hrs free services. Suppose downtime took 2-3 hrs. then what ? In that case how do hospital can say that we have provided 1 hrs free services though.
Chances are there, that there was no issue at all, hospital was ready and happy to provide free service, but God grace, no patient visited. Still in this case how hospital can say that we have provided 1 hr free service for zero patients.
Kindly help me how to do incoporate all these things.
Thanks and Regards
Girish Sharma
July 18, 2012 at 8:34 am
This request is WAY beyond the scope of an online forum. You are asking somebody to design your entire application and database. If you are truly stuck at the starting point of this project I would highly recommend you hire a consultant.
And for what it is worth you should try to convince the hospital to upgrade to some modern systems. You detail some incredibly out of date stuff here.
SQL Server 2000 end of life: Technically ended in 2008 but they extended until April 2013. http://support.microsoft.com/lifecycle/search/?sort=PN&alpha=SQL
VB6 end of life: April 8, 2008 http://blogs.technet.com/b/lifecycle/archive/2008/04/16/end-of-support-for-visual-basic-6-0.aspx
Windows Server 2003: not dead yet but not too far away. http://support.microsoft.com/lifecycle/search/default.aspx?alpha=Windows+Server+2003+R2
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 19, 2012 at 2:56 am
Thank you for your reply. I don't know how and why you are anticipating that I am saying to build the whole project for me and this is beyond the scope of an online forum :w00t:
I am just looking a piece of code whether at db side or at application side by which I may know that if it is between 8.30 to 9.30 AM then patienttype.table should be updated by 'Z' else some other value. If there is some issue with either server side or client side for suppose 20 mins then 9.30+20 min should be entertained.
Thanks and Regards
Girish Sharma
July 19, 2012 at 7:08 am
Well it is very unclear what you are trying to do here. Do you have these tables designed already? Can you post the ddl, sample data and desired results? I suspect we have a language barrier but we can deal with that. 🙂
I am willing to help but I don't really know what the question is.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply