Hello,
I have an intranet site that connects to an MS SQL database. The database contains names of patients with email and surgery dates. This website generates letters in pdf based on the surgery date and also emails if email is available. there are four types of patients.
Case 1- Surgery date within the last five years with email
Case 2- Surgery date over five years with email
Case 3- Surgery date within the last five years without email
Case 4- Surgery date over five years without email
The current system kind of works, however the generate document options are too many and very confusing. This new scheme will do all that needs to be done in one click.
## Deliverables
Hello,
I have an intranet site that connects to an MS SQL database. The database contains names of patients with email and surgery dates. This website generates letters in pdf based on the surgery date and also emails if email is available. there are four types of patients.
Case 1- Surgery date within the last five years with email
Case 2- Surgery date over five years with email
Case 3- Surgery date within the last five years without email
Case 4- Surgery date over five years without email
The current system works, however the generate document options are too many and very confusing. This new scheme will do all that needs to be done in one click.
I want the generate document button to only have one option that will do the following:
Case 1: Patient is marked active and has an email address on file:
a. And is under 5 years old:
b. Create the pdf using the regular template, add _Emailed to the filename and save it to C:\DATA\13_Monthly_Lab_Letters. For example [login to view URL]
c. Email the pdf to the patient
d. Leave the patient active
Case 2: Patient is marked active and has an email address on file:
a. And is under 5 years old:
b. Create the pdf using the Last template, add _Emailed and _Last to the filename and save it to C:\DATA\13_Monthly_Lab_Letters. For example [login to view URL]
c. Email the pdf to the patient
d. Mark the patient inactive
Case 3: If it is marked active and does not have an email address on file:
a. And is under 5 years old:
b. Create the pdf using the regular template, add _Mailed to the filename and save it to C:\DATA\13_Monthly_Lab_Letters. For example [login to view URL]
c. Leave the patient active
Case 4: If it is marked active and does not have an email address on file:
a. And is over 5 years old:
b. Create the pdf using the Last template, add _Emailed and _Last to the filename and save it to C:\DATA\13_Monthly_Lab_Letters. For example [login to view URL]
c. Mark the patient inactive
One other issue is that the documents are not being emails. It used to work.
All the code is there, and it needs to be rearranged I guess.
All the variables are stored in the [login to view URL] file:
<appSettings>
<add key="DocPath" value="C:\DATA\13_Monthly_Lab_Letters"/>
<add key="TemplatePath" value="C:\DATA\Intranet\Annual_Lab\templates"/>
<add key="TemplateVDir" value="~/Templates"/>
<add key="EmailServer" value="server1"/>
<add key="SenderEmailAddress" value="1@[login to view URL]>
<add key="SenderDisplayName" value="John Doe"/>
<add key="LogPath" value="c:\"/>
<add key ="LastAge" value="5"/>
<add key="MainTemplate" value="[login to view URL]"/>
<add key="LastTemplate" value="[login to view URL]"/>
</appSettings>
<connectionStrings>
<add name="AKMDConnectionString" connectionString="Data Source=server1\sqlexpress;Initial Catalog=AKMD;Persist Security Info=True;user=sa; password=12345" providerName="[login to view URL]"/>
</connectionStrings>
Thank You.