Jump to content
Server Maintenance This Week. ×

Portal Pre-Population with Records?


Mark L

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

Recommended Posts

This forum has so many brilliant minds (I say this in all earnestness) - I'm looking for ideas on how to best handle the following:

Part of the application I'm developing requires users to enter results for dozens of medical tests from paper print offs. Regionally, each lab provides these results in a different order ' so I've decided that using a portal is the way to offer the user control over which sort of the entry records. I have other postings on that topic ' and think I've overcome the sort issues. ALSO users need to (on rare occasions) add their own tests to the list (in my example, they may add two new tests to the existing 53) - so hard coding the tests isn't really an option for that reason too.

Here's my next challenge: I'm not sure how I'm going to 'automatically' populate the portal with the dozens of 'blank' records for data entry. I put 'blank' in quotes ' because they are not really blank ' quite the opposite ' they will have all the information except the actual test result value that needs to be entered. Here's an example of a few 'blank' records:


 Sort Order   Test Name   *Test Result*     Test Units

------------    -------------   ---------------       -------------

     1              XYZ Test	   _____          mg/dl

     2              QQ3 Test          _____          k/cumm

     3              ABC Test          ______         ratio

(50 records later:)

    53             SQP Test          _______      mg/dl

Once the user fills in the test results (and some results may be left blank) ' I'll need to write out the records with the patient's ID & and the date.

So I'm looking for suggestions on how to have a fixed number - 53 (using the example above) 'pre-populate' the portal. Secondarily ' if anyone has suggestions on how to best write the records out ' including the situation where the user aborts the input effort and the portal records shouldn't be saved/committed ' I'd truly appreciate it.

My gut seems to say have a script that picks up the PatientID and Lab Date (business rule is there can only be one set of tests related to one Lab Date - so it can be a key) Copies the "blank" records from a database where the 53 "blank" records are stored, pend the Patient ID and Lab Date to them, then open up the Test Entry Layout, which has the portal to the freshly written out records. When test entry is complete, save the records.

One worry is how would someone be able to come back and edit records - and another is "false commitments" (someone entered the data for the wrong patient - needs to delete the old and re-write under a different patient.)

Any insight people have into this would be greatly appreciated.

Sincerely,

Mark

Edited by Guest
clean up
Link to comment
Share on other sites

BruceR-

I've spent some time studying this now - and I'm amazed by the relative simplity and power of what you've done! cool.gif I tip my hat to you.

Sorry to bother you with relative trivia:

One question: A blank record seems to be surfacing somehow - it's even in the example you posted. Any idea on how that gets created?

I also noticed one got created when I was playing around with your example - and had added a Patient record "directly" into the Patient file rather than via the instructions on your layout.

(I'm going to be away from my PC for the next day or so - but I'm looking forward to sinking my teeth back into your solution as soon as I next hit the keyboard.)

Sincerely,

Mark

Link to comment
Share on other sites

There are no blank records created when I run it. You aren't specifiying which table gets the blank records. You DO have to commit the patient record first before entering result entries. Also note that in the TestResults layout, I was using the wrong relationship to show patients. This isn't a polished or complete solution - just a very quick demonstration of the basic technique. Note that you could change the X relation to a different relation based on a global, so for instance you would show only test items for Type A or Type B or whatever.

Link to comment
Share on other sites

BruceR-

(I checking things out - I couldn't confirm where the blank record got created - it must have been from me playing around with things.)

I really have been able to use your basic design as a model and incorporated it into my solution. I added an additional field to match records by (it's now PatientID AND LabDate) - and I added an additional field in the TestItems file called SortOrder. SortOrder is used in the portal to allow the user to choose the order of the TestResult records seen in the portal (As part of the initial Portal definition - I designate that SortOrder for sorting.)

This probably is another "newbie" type question - but here goes:

Any suggestions on how best to control the ability to protect a field from being edited in the portal? In fact I'll break it into two related issues:

1) I don't want someone to be able to edit a given field that appears in the portal - but of course, I do want it editable in it's "native" maintenance screen.

2) I'd love to be able to toggle on/off the access to my SortOrder field in the portal - to prevent someone from changing it inadvertently.

Any and all thoughts are greatly appreciated.

Thank you one and all

Link to comment
Share on other sites

-Queue-

You can disable access to a field in a portal and it will not effect the field's formatting in another layout.

I apologize for a completely ignorant follow-up question: Where do I configure this function?

Thanks,

Mark

Link to comment
Share on other sites

Thanks -Queue- - I found myself on this screen many times before - but stupidly didn't pay much attention to it - somehow the word "Browse" didn't click as the area where data entry takes place - pretty stupid, I know. Shows my brain isn't fully FMP-ized yet. Anyway, thanks to you, I've already made corrections to my layout.

Follow-up question: Do you know of a way to toggle this functionality on and off via a script?

Thanks again,

Mark

Link to comment
Share on other sites

You can set a number field, call it Lock, with a zero or 1, disable access to the field, and format it as a button attached to a script that checks the value of Lock and goes to the field if it's 1 or halts the script if it's zero.

You can also define such permissions in the Accounts & Privileges section.

Link to comment
Share on other sites

Thanks -Queue- for you speedy response.

OK - so for my simple mind I'll repeat back my understanding - and then point out the only thing I still don't quite grasp:

1) Create a field called Lock - Number as its Type - default value of "0".

2) Change the field I call "Sort" so no one can edit it - via "Field Behavior" in Layout mode.

3) Make Lock field into a button that calls a script.

4) The script checks the value of Lock field ("0" for no access or "1" for edit access) and "goes to the field" - this is where I lose you. I'm not sure what you mean by this.

This is the point where I need to allow access to my field called "Sort" if the Lock field is a "1" - no?

Sorry to be so long winded, but I'm just trying to understand.

Much Thanks,

Mark

Link to comment
Share on other sites

3) Make Sort, not Lock, a button attached to a script that checks

If [not Lock]

Go to Field [sort]

End If

You can add an Else if you want to show a message or something similar if the field is locked.

Change Lock via script or on a Developer Only layout, etc.

Set Field [Lock; Lock <> 1]

which will toggle Lock between zero and 1.

Link to comment
Share on other sites

  • 1 year later...

This topic is 6307 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.