5 Replies Latest reply on May 17, 2009 6:15 PM by FentonJones

    insert and view all data sample concernig to a patient, all in a portal.



      insert and view all data sample concernig to a patient, all in a portal.


      Hi  Friends!

      I had 2 table:

      1)Patient; fields :id, Name , Age

      2)Sample; fields :id, D1, D2. Id fields are linked.

      I should create a format with patient anagraphic data : Name Age.. ecc (i have done) and in the same format i shoud insert a portal or something like that (i have olso done). This portal should contain all samples concerning a patient (each sample has different caratteristics).




      \ Name: Alex,  Age: 55,         \                                               

      \ .......................................\                                             

      \ (portal)                             \

      \                                        \                                 

      \ D1:Blood, D2:HIV               \

      \ D1:Urine, D2:glucose          \

      \ - Here i wont to insert more sample concenrnig Alex - \


      The problem is insert and view all datas sample concernig to a patient, all in the same format. 

        • 1. Re: insert and view all data sample concernig to a patient, all in a portal.
             <!-- [if gte mso 9]><xml> <w:WordDocument>   <w:View>Normal</w:View>   <w:Zoom>0</w:Zoom>   <w:PunctuationKerning/>   <w:ValidateAgainstSchemas/>   <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>   <w:IgnoreMixedContent>false</w:IgnoreMixedContent>   <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>   <w:Compatibility>    <w:BreakWrappedTables/>    <w:SnapToGridInCell/>    <w:WrapTextWithPunct/>    <w:UseAsianBreakRules/>    <w:DontGrowAutofit/>   </w:Compatibility>   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif] --><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif] --><!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal      {mso-style-parent:"";      margin:0cm;      margin-bottom:.0001pt;      mso-pagination:widow-orphan;      font-size:12.0pt;      font-family:"Times New Roman";      mso-fareast-font-family:"Times New Roman";      mso-ansi-language:EN-GB;} @page Section1      {size:595.3pt 841.9pt;      margin:72.0pt 90.0pt 72.0pt 90.0pt;      mso-header-margin:35.4pt;      mso-footer-margin:35.4pt;      mso-paper-source:0;} div.Section1      {page:Section1;} --><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable      {mso-style-name:"Table Normal";      mso-tstyle-rowband-size:0;      mso-tstyle-colband-size:0;      mso-style-noshow:yes;      mso-style-parent:"";      mso-padding-alt:0cm 5.4pt 0cm 5.4pt;      mso-para-margin:0cm;      mso-para-margin-bottom:.0001pt;      mso-pagination:widow-orphan;      font-size:10.0pt;      font-family:"Times New Roman";      mso-ansi-language:#0400;      mso-fareast-language:#0400;      mso-bidi-language:#0400;} </style> <![endif] -->

          Hi jonny


          As I understood, you don’t have those tables related in a relationship. In your table Patient create a new field Patient_ID, type Numeric, click on Options and in Auto-Enter tab check the box Serial Number. Click OK.

          Now select your table Sample and create a numeric field named SamplePatient_ID. Click on Options and in the Auto-Enter tab check the box Calculated Value. A new window will pop-up. You will see a drop-down box with Current Table [“Sample”] in it. Click on the arrow and select your Patient table. Now double click on Patient_ID. You’ll see the words “Patient: :Patient_ID” in the middle text area. Click OK and click OK   on auto-enter window.


          Now, select the tab Relationships.  You’ll see your 2 tables in the graph. Drag the field Patient_ID into the field SamplePatient_ID in your Sample table to create a relationship line with a square in the middle containing the = symbol. Double click in that square to open the relationship window and in the bottom of the window, on the Sample table side, check the boxes – Allow creation of records in this table via this relationship – and – Delete related records in this table when a record is deleted in another table. Click OK in all windows.

          Now see how it works. You may need to insert the field Patient_ID in your layout and edit it to allow auto-enter to generate numbers for the records that you already have.




          • 2. Re: insert and view all data sample concernig to a patient, all in a portal.

            OK but when i search samples in portal's fields i find all data samples from specific patient that contain also my specific sample data... i want to find only specific data sample of specific patients. Is it possible?

            • 3. Re: insert and view all data sample concernig to a patient, all in a portal.

              Not quite sure what you're asking. Do you want to Find only specific data from one patient? If so, you'd do the Find in the table with the data samples, not in the Patient table's portal. In a script you could pass the current patient's ID to the samples table, via a Script Variable. You could then ask for the data value to search for (in a dialog, using a global field, if you know which field), then do the search with both pieces of info, patient ID and data value. Or the script could just Enter Find Mode, in the data sample table, set the Patient ID to the Variable, then Pause, then Perform Find. That way you could modify the Find request however you want.


              A Find in a portal will Find "all patients who have this value in their data sample" (and be kind of slow). If you want more control, and more speed, go to the table which has all the data being searched on.


              In the "child" data table you can always show the "parent" Patient data, via the relationship on Patient ID. It could be in a Summary Part, with its many data records underneath it. In FileMaker 10 this can be shown in Browse Mode, but earlier versions require Preview Mode. Both require a Sort. The Sort can be a script, which, in 10, can be run by a Script Trigger, attached to the layout itself, OnLayoutLoad, as well as OnModeEnter, Browse mode, so it resorts after a Find. I'm starting to use this method to augment portals, which are OK, but kind of limited.

              • 4. Re: insert and view all data sample concernig to a patient, all in a portal.

                Hi Fenton J. I'll try to be clearer than before: I want to request my database for a specific patient (already done). Now I want to request for specific sample (I don't know how). For this kind of search I want to use a format made up patient's anagraphic data and a portal with sample data. Is it possible?

                Different patient could have same kind of sample (ex:I want to find information about urine samples between 40 patient).


                • 5. Re: insert and view all data sample concernig to a patient, all in a portal.

                  Well, what you're asking for may not be so easy. A portal can and should show whatever sample data fields for the patient which you put in it; if your relationship is correct. But what it cannot do is swap those fields for others on the fly. Perhaps you are used to SQL databases, where something like that is possible (but not in a portal). What you could have is several portals, each in a different tab of a Tab Object, clearly labeled. Then you could see different sets of sample fields in each tab, so you'd just click on the one you wanted; you can also change the default tab, move them around, or script bringing one to the front (not so easy). 


                  If you really want to "compare" the results from different patients with each other, the only serious way to do that is create a dedicated layout in the Sample Data table, with the fields you want, then look at the results there, in a List view. It is possible to transfer a found set of Patients to that table, by using the Go To Related Record [ patient to data relationship; matching records, (•) Match all records in the current found set ].