Sorry for not put myself clear.

My model is simple, an doctor requests a lab test and gets corresponding 
result, and the result are related to the request. For example, if the doctor 
orders two lab test requests, full-blood-count-request and 
liver-function-request, then there are two lab test results, 
full-blood-count-result and liver-function-result, and the 
full-blood-count-result is related to the full-blood-count-request, the 
liver-function-result is related to the liver-function-request. So that the 
corresponding result can be found from the request and vice versa.

Is that clear enough?

In programming language, a possible implementation I think may be that there 
are two classes, lab-test-request and lab-test-result, lab-test-result has an 
attribute stores id of lab-test-request instances to hold the relationship 
between these two classes.
Does use LINK in archetypes go the same way? The LINK attribute 
in?archetype?lab test result points to archetype lab test request, and in lab 
test result archetype instance the LINK attribute stores id of lab test request 
archetype instance? Is that right?

And how to use template to model the relationship between lab test request and 
lab test result??

Thanks a lot!

Kind regards,
Li Wang

On Sep 11, 2014, at 09:09 PM, Athanasios Anastasiou <a.anastasiou at 
swansea.ac.uk> wrote:

Hello Wang

 ? ? ?> 1. Does LINK require the linking attributes to be explicitly defined in
 ? ? ?> archetypes?
A LINK uses an EHR URI (page 77 in 
http://www.openehr.org/releases/1.0.1/architecture/rm/data_types_im.pdf) 
to define its end-points and that can be as detailed as needed. However, 
the LINK's mission is not to relate fields (as if it were a foreign key 
for example) but to relate concepts which are represented by archetypes. 
The overview in Page 23 in that previous document I linked is a very 
good starting point about LINKs.


 ? ? ?> For example, should one more LINK typed attribute be added
 ? ? ?> under links attribute in openEHR-EHR-OBSERVATION.lab_test.v1 target at
 ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1?
It would really depend on what you are trying to do. My recommendation 
would be to make sure that all information necessary for defining the 
OBSERVATION stays with the OBSERVATION rather than linked to another 
entity.

Is it possible for you to share a bit more information about what you 
are trying to model?



 ? ? ?> 2. If I use a template with a SECTION node and put both
 ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1 and
 ? ? ?> openEHR-EHR-OBSERVATION.lab_test.v1 under it using archetype slots, does
 ? ? ?> that means these two archetypes are implicitly related to each other?
If you do it in that way you would effectively be relating SOME 
request-lab_test with SOME lab_test in the context described by that 
specific template. Better specialise it all the way down to the specific 
archetypes you want to use. That relation would be semantic, i.e. for a 
process to occur (in the real world) it requires these two pieces of 
data to be known / recorded.

 ? ? ?> For example, in openEHR-EHR-SECTION.soap.v1, is OBSERVATION[at0006] node
 ? ? ?> implicitly related to SECTION[at0007]?
They will be related because when it comes to querying for that piece of 
data you would have to specify that you require all EHR's that contain 
data structured according to that particular template and that 
furthermore the OBSERVATION is (for example) 125 BPM.

 ? ? ?> And how to express one to many
 ? ? ?> relationship between these two in template?
Do you mean one section to many observations? It does not exactly work 
like this.


The Reference Model is a palette of data structures and each one fits a 
particular use (in the "real" world). If you have more than one 
OBSERVATIONs associated with the same event, perhaps you need to express 
this in a different way.

Which brings us back to an earlier question, what are you trying to model?


Hope this helps.

All the best
Athanasios Anastasiou









On 11/09/2014 13:41, li wang wrote:
 ? ? ? ?> Thanks a lot!
 ? ? ? ?>
 ? ? ? ?> LINK can solve my problems very well. But I still have some questions
 ? ? ? ?> between using LINK and templates.
 ? ? ? ?>
 ? ? ? ?> 1. Does LINK require the linking attributes to be explicitly defined 
in
 ? ? ? ?> archetypes? For example, should one more LINK typed attribute be added
 ? ? ? ?> under links attribute in openEHR-EHR-OBSERVATION.lab_test.v1 target at
 ? ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1?
 ? ? ? ?>
 ? ? ? ?> 2. If I use a template with a SECTION node and put both
 ? ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1 and
 ? ? ? ?> openEHR-EHR-OBSERVATION.lab_test.v1 under it using archetype slots, 
does
 ? ? ? ?> that means these two archetypes are implicitly related to each other?
 ? ? ? ?> For example, in openEHR-EHR-SECTION.soap.v1, is OBSERVATION[at0006] 
node
 ? ? ? ?> implicitly related to SECTION[at0007]? And how to express one to many
 ? ? ? ?> relationship between these two in template?
 ? ? ? ?>
 ? ? ? ?> Thanks again!
 ? ? ? ?>
 ? ? ? ?> Kind regards,
 ? ? ? ?> Li Wang
 ? ? ? ?>
 ? ? ? ?> On Sep 11, 2014, at 03:55 PM, Athanasios Anastasiou
 ? ? ? ?> <a.anastasiou at swansea.ac.uk ?> wrote:
 ? ? ? ?>
 ? ? ? ?> ? ? ? ?> Hello Wang
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> It depends on the relationship. INSTRUCTION and OBSERVATION 
are separate
 ? ? ? ?> ? ? ? ?> entities because they map to two completely different things 
in reality.
 ? ? ? ?> ? ? ? ?> Is the INSTRUCTION an integral part of the OBSERVATION?
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> If you really want to maintain some sort of relationship 
between these
 ? ? ? ?> ? ? ? ?> two then you could use a LINK (see
 ? ? ? ?> ? ? ? ?> www.openehr.org/releases/1.0.2/architecture/rm/common_im.pdf
 ? ? ? ?> ? ? ? ?> 
<http://www.openehr.org/releases/1.0.2/architecture/rm/common_im.pdf ? ? ? ?>)
 ? ? ? ?> ? ? ? ?> But they
 ? ? ? ?> ? ? ? ?> would still have to be stored separately.
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> If these two are related within the context of a specific 
operation /
 ? ? ? ?> ? ? ? ?> examination / consultation or other process, then it would 
be better to
 ? ? ? ?> ? ? ? ?> create a template that brings these two separate archetypes 
together
 ? ? ? ?> ? ? ? ?> with any additional information you might need to capture.
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> Hope this helps
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> All the best
 ? ? ? ?> ? ? ? ?> Athanasios Anastasiou
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> On 11/09/2014 02:41, Li Wang wrote:
 ? ? ? ?> ? ? ? ?> ? ? ? ?> Hi,
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> I'm try to understand how to model relationship 
between
 ? ? ? ?> ? ? ? ?> archetypes. For
 ? ? ? ?> ? ? ? ?> ? ? ? ?> example, there are two archetypes in CKM,
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1 and
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-OBSERVATION.lab_test.v1
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> My question is, how to express the relationship that
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-OBSERVATION.lab_test.v1 relates to
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1?
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> I tried possible methods:
 ? ? ? ?> ? ? ? ?> ? ? ? ?> 1. Add an attribute in 
openEHR-EHR-OBSERVATION.lab_test.v1
 ? ? ? ?> ? ? ? ?> referring to
 ? ? ? ?> ? ? ? ?> ? ? ? ?> uid of openEHR-EHR-INSTRUCTION.request-lab_test.v1.
 ? ? ? ?> ? ? ? ?> ? ? ? ?> 2. Use archetype slots. But I think archetype slots 
are not
 ? ? ? ?> ? ? ? ?> allowed
 ? ? ? ?> ? ? ? ?> ? ? ? ?> between Entry based archetypes, is that correct?
 ? ? ? ?> ? ? ? ?> ? ? ? ?> 3. Define a new Section archetype as container and 
put both
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-INSTRUCTION.request-lab_test.v1 and
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-EHR-OBSERVATION.lab_test.v1 in it.
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> Which is correct? And is there any better method?
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> Thanks!
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> Kind regards,
 ? ? ? ?> ? ? ? ?> ? ? ? ?> Wang Li
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?> _______________________________________________
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-technical mailing list
 ? ? ? ?> ? ? ? ?> ? ? ? ?> openEHR-technical at lists.openehr.org
 ? ? ? ?> ? ? ? ?> <mailto:openEHR-technical at lists.openehr.org ?>
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> 
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
 ? ? ? ?> ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?>
 ? ? ? ?> ? ? ? ?> _______________________________________________
 ? ? ? ?> ? ? ? ?> openEHR-technical mailing list
 ? ? ? ?> ? ? ? ?> openEHR-technical at lists.openehr.org
 ? ? ? ?> ? ? ? ?> <mailto:openEHR-technical at lists.openehr.org ?>
 ? ? ? ?> ? ? ? ?> 
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
 ? ? ? ?>
 ? ? ? ?>
 ? ? ? ?> _______________________________________________
 ? ? ? ?> openEHR-technical mailing list
 ? ? ? ?> openEHR-technical at lists.openehr.org
 ? ? ? ?> 
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
 ? ? ? ?>

_______________________________________________
openEHR-technical mailing list
openEHR-technical at lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20140911/71438a45/attachment-0001.html>

Reply via email to