Linking one record to one record
hello everyone
I am working on a medical project
I have a table with patient information such as name, ID, DOB, etc.
I have created two more tables with a questionnaire and a CT report.
I need to link the patient information with a single record in the other two tables, not with many records.
And I need that when I open the questionnaire it will show me the information related to the patient in a non editable way.
thanks in advance
3 replies
-
Hi Leonardo
This might be overkill but you can create a pair of links between the tables, pointing in opposite directions. I tested this with two tables, Letters and Numbers
In the Letters table, in the Trigger after update of the Numbers field put
let a := this; first(NumbersMany).(Letters := 0); Numbers.(Letters := a)
And in Constraints put
b.Letters = null
In the Numbers tables, in the Trigger after update of the Letters field put
let a := this; first(LettersMany).(Numbers := 0); Letters.(Numbers := a)
And in Constraints put
b.Numbers = null
Finally, hide the NumbersMany and LettersMany fields. Now you have a 1:1 relationship that is fully maintained from both sides.
Regards John
-
Hi Leonardo -
You can create a reference field in your questionnaire and CT tables to the patient table. That will create a link between the tables.
You can then either:
1) select the patient while in either the questionnaire or CT tables
or
2) while looking at a patient, create a new record in questionnaire or CT tables which will link the records
To view other patient info while in the questionnaire or CT tables you can create formula fields that, for example, show the linked patient's date of birth (dob).
patient.DOB
In your patient table you can do:
first(questionnaire.Answer1)
to show you the data that is the Answer1 field of the first questionnaire on record.
Hope this helps start you off. Let us know how it goes.
-
thanks to all!!!
i revolve it!
Content aside
- Status Answered
- 2 yrs agoLast active
- 3Replies
- 119Views
-
4
Following