Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Two portals from one file yield blank entries


This topic is 7699 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've got one file (eye surgery) in which every surgery is a record. There are two portals that list all patient surgeries, one for the right eye and one for the left eye. Unfortunately, when the right eye has a surgery, the left portal creates a blank entry, and visa versa. Is there any solution to this? The portals look a little questionable with the blank spots in them. Plus, if you click on the portal (button) in a blank spot in the left eye portal, your taken to a right eye's surgical record.

Thanks!

Posted

Basically, while I assume you currently use a relationship Patient_ID::Patient_ID, you'd need to move to a new relationship (actually 2) using a calculation at right side (of your relationships) :

c_WhichEye = Case(EyeSide = "Right"; Patient_ID&"-"&"Right";EyeSide = "Left"; Patient_ID& "Left";"") - indexed.

Then, at left side, you'd need a couple of calculations that would allow to match this new key.

One way of doing this could be to use 2 global text fields, populated with "Right" and "Left" and use 2 calculations (unstored) :

c_unstLeftEye = Patient_ID&"-"g_Left

c_unstRightEye = Patient_ID&"-"&g_Right.

The Patient_ID could be another global field, and the g_Left and g_Right could be calculations or autoentered text, depending on your needs.

Then, obviously, use both calcs for a relationship to the c_WhichEye key and make sure your fields in portals are using these new relationships.

All the best.

Posted

That makes sense - to define a unique relationship to each portal. Thanks Ugo!

I've uploaded a sample of your solution. One other question. I'd like to automate the entry of the "EyeSide" field based on which Surgery field is selected. I tried the following calculation, but the calculation was not accepted. Whats wrong with this calculation:

Case (IsValid (Surgery Right Eye), "Right",

TwoPortals.zip

Posted

That's how I'd handle this one.

Some little changes.

At right side :

PatientID - Auto-entered

Surgery Right Eye - by Value List

Surgery Left Eye - by Value List

It can be handy to add some "number based" calc, so here are the changes to my previous suggestions.

This would be particularly helpful if you had to use some toggle script steps later on.

c_WhichEyeNum (calc, number) = Case(not IsEmpty(Surgery Right Eye), 1,not IsEmpty(Surgery Left Eye),2,0)

c_WhichEyeText (calc, text) = Choose(c_WhichEye,"", "Right","Left")

c_EyeKey (calc-compound) = Choose(c_WhichEyeNum, "", PatientID&"-"&1,PatientID&"-"&2)

These calcs would work as you said you have only one Surgery Category selected per record. Validate by calc to prevent errors.

Now, change your globals in the Portal File.fp5 to :

g_Right (number) = 1

g_Left (number) = 2

Please note that for clarity, you shouldn't use the "g_" abbreviation if the field isn't a global field.

This topic is 7699 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.