Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use access for documentation?

Status
Not open for further replies.

ajhts

Technical User
May 1, 2001
84
0
0
US
Can this be done in access and how would I start.

We are a healthcare company and want to create a documentation form.

We would like them to have a drop down of predefined sentences, that when they click on the sentence they want, it adds it to the textbox that they are typing the note.

Screen example:

Drop Down of predefined
Sentences:

Patient has difficulty walking

When they select Patient has difficulty walking,
it places is in the text/memo box below and they can select another sentence that adds to it or start simply typing after walking. I hope I am explaining this right!

AJ
 
AJ

Ues this can be done. In fact you can have a great tool for this...

If you create a many-to-many relationship between the patient encounter table and (I will call it) symptoms, you can a) simplify the assignment of symptoms.

Simplifed approach...

tblPatient
PatientID - primary key
PatientLN - last name
PatientFN - first name
...etc

Discussion:
I am sure you already have a patient table. This just presents my assumptions, specifically, PatientID.

tblSymptom
SymptomCode - primary key, text
SymptomName -Decriptive short text
SymptomGroup - Group code used for sorting
Sentence - Decriptive sentence

Discussion:
You can use SymtomID or code. I chose to use a text code here, but you can use a number.

The SymptomGroup would be a way of sorting your data. For example, SKIN, BONE, INTERNAL, etc. Or LeftArm, RightArm, etc. You can choose to use more than one group. This allows you to look at all your sentences pertaining to SKIN for example.

tblEncounter
EncounterID - primary key
PatientID - foreign key to Patient table
ProfessionalID - foreign key to professional table (doctor, nurse)
EncounterDate - date

Discussion:
This is just a basic encoutering table. for example, you may wish to capture nureses and doctor and external professionals. In which case you would have to add another table to catpure this data.

tblEncounterSymtom
EncounterID - foreign key to Encounter table
SymptomCode - foreign key to Symptom table
PatientID - foreign key to Patient table

Primary key = EncounterID + SymptomCode

Discussion:
Okay, this is the "meat"
You list all the symptoms for the specific encounter.

The PatientID is not really requried since it is captured in the Encounter table. However, storing the foriegn key here as well may help simplify some queries later on.

[COLOR=blue yellow]Presentation[/color]

Now the second part of the objective -- to have this info display as paragraph. Nothing will beat good old common sense, and you do not want to spend a zillion dollars on a sophisticated "parsing" program. But if you were smart about your "sentences", the end result should be acceptable.

Before proceeding, let's look at the data...
[tt]
tblPatient
PatientID PatientLN

100 Smith
101 Jones

tblSymptom
SymptomCode SymptomName SymptomGroup Sentence

LMPLFTLEG Limp Left Leg MOTOR Patient limps on left leg.
CUT2LFTLEG Cut 2nd Level Left Leg SKIN Patient has deep cut on left leg.
CUTLOCABVANK Cut above ankle SKIN Cut is located above the ankle.

tblEncounter
EncounterID PatientID ProfessionalID EncounterDate

1 100 1 08/25/2004
2 101 1 08/25/2004


tblEncounterSymptom
EncounterID SymptomCode PatientID

1 LMPLFTLEG 100
1 CUT2LFTLEG 100
1 CUTLOCABVANK 100

[/tt]

Although this data may make sense to you, it still has to be "put together".

A little bit of VBA coding would address this issue...

This code looks at the symptoms selected by the encountering professional, and strings them together...
Code:
Dim rst as DAO.Database, rst as DAO.Recordset
Dim strSymptoms as String, strSQL as String, strQ as String

strQ = Chr$(34)   'Double quote for text strings
strSymptoms = ""

Set dbs = CurrentDB()

'Build SQL statement for form
'Assume Encounter and Patient ID on form, Me.--ID

strSQL = "SELECT Sentence from tblEncounterSymptom WHERE " _
& "EncounterID = " & Me.EncounterID & " And " & _
& "PatientID = " & Me.PatientID

Set rst = dbs.Openrecordset(strSQL)

'Now loop
With rst
   .MoveFirst

   Do While Not .EOF

      'Find the sentence for the symptom
      strSymptoms = DLookup("Sentence", "tblSymptom", "SymptomCode = " & strQ & !SymptomCode & strQ) & "  "

      .MoveNext
   Loop
End With

'Remove trailing space
strSymptoms = Trim(strSymptoms)

'Display message to text box on form
Me.UnboundBigTextBox = strSymptoms 

rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing

The end result would be somthing like...
Patient limps on left leg. Patient has deep cut on left leg. Cut is located above the ankle.

So yes, it is do-able. But it does requrie coding, and creating / building upon the sentences would be qute the task -- probably something done over time.

Some added benefits...
- You can quickly find out how many times Mr Jones hurt his right arm, or Ms smith had upset stomach problems
- You can determine how many of your patients reported heart problems in the last month
...etc.

These added benefits would make use of the sorting fields previously disucssed.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top