AnsweredAssumed Answered

Description Search Script

Question asked by CaitlinM on Jul 20, 2011
Latest reply on Jul 27, 2011 by CaitlinM

Title

Description Search Script

Post

Hello,

I am trying to create a script that will populate information based on a search. For this script I am working with mainly 2 tables, one that links a referring doctors first names and last names to the patient information, and then through a uniqueID for each doctor, is related to another table with all the information related to that doctor.

Table:

Referral Info

Fields: 

Referring MD ID

MD Last Name

MD First Name

Phone, Email, Address, Etc.

Table:

Patient Info

 Fields:

Patient ID

Referring MD Last Name

Referring MD First Name

Referring MD ID

The problem is I imported this information from Access and so I have a complete table for the referringMD with all the information, which I then assigned unique IDs to each referring MD. However in the patient information table, the last and first names got imported, but without going through each patient, I do not know how to attach the referring MD ID to the patient information.

So far I have this script which is not working:

Set Variable [$SearchText; Value: Get Value (Get ScriptParameter); MD Last Name)]

If [not IsEmpty ($SearchText)]

Freeze Window

Go to Layout ("Referring MD List")

Enter Find Mode

Set Field [Referring MD:: MD Last Name; Quote ($Search Text)]

Set Error Capture [on]

Perform Find []

If [Get (FoundCount) = 0]

Go to Layout [Referring MD]

Show Custom Dialog ["No Doctor Name Containing" & Quote ($SearchText) & "was found."

Else If [Get (FoundCount) = 1]

Set Field [Referring MD:: ReferringMD ID; ReferringMDID]

End If

Thanks for any help you can give!

Caitlin

Outcomes