Template:— observation (obs)
Context:— UK_Defence
Date: 2009/11/03 00:53:14
Revision: 1.5
Template: observation

XML references to the Template

These can be cut and pasted into the XML as required.

observation

Set up a hyperlink to the template definition.
<template_ref name="observation" context="UK_Defence" />

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="observation" context="UK_Defence" >
  <param name="ID">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="ID_source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Description">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_year">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_month">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_day">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_hour">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_minute">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Made_on_second">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Subject">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Observer">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="Where_made">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="observation">
  <param_in name="ID" value=""/>
  <param_in name="ID_source_organization" value=""/>
  <param_in name="Description" value=""/>
  <param_in name="Made_on_year" value=""/>
  <param_in name="Made_on_month" value=""/>
  <param_in name="Made_on_day" value=""/>
  <param_in name="Made_on_hour" value=""/>
  <param_in name="Made_on_minute" value=""/>
  <param_in name="Made_on_second" value=""/>
  <param_in name="Subject" value=""/>
  <param_in name="Observer" value=""/>
  <param_in name="Where_made" value=""/>
</template_example>

observation
/observation(ID='', ID_source_organization='', Description='', Made_on_year='', Made_on_month='', Made_on_day='', Made_on_hour='', Made_on_minute='', Made_on_second='', Subject='', Observer='', Where_made='')/

Path

/assigning_observation(
    id=@ID,
    id_class_name='Observation_identification_code',
    id_ecl_id='urn:plcs:rdl:std',
    org_id=@ID_source_organization,
    org_id_class_name='Organization_identification_code',
    org_id_ecl_id='urn:plcs:rdl:std',
    descr=@Description,
    dsc_class_name='Observation_description',
    dsc_ecl_id='urn:plcs:rdl:uk_defence',
    date_class_name='Date_actual_observation',
    date_ecl_id='urn:plcs:rdl:std',
    year=@Made_on_year,
    month=@Made_on_month,
    day=@Made_on_day,
    hour=@Made_on_hour,
    minute=@Made_on_minute,
    second=@Made_on_second,
    sense='exact',
    hour_offset=0,
    minute_offset=0,
    applies_to=@Subject )/
%^observation = $assigning_observation.observation%
%^observation_item = $assigning_observation.observation_item%

-- Create relationship to observing person
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.items -> ^observation
Organization_or_person_in_organization_assignment.assigned_entity -> @Observer
Organization_or_person_in_organization_assignment.role = '/IGNORE'

-- Create notional observation activity so that a location may be assigned
Activity_actual
Activity_actual.id = '/IGNORE'
Activity_actual.name = '/IGNORE'
Activity_actual.description = '/IGNORE'
Activity_method
Activity_method.name = '/IGNORE'
Activity_method.description = '/IGNORE'
Activity_method.consequence = '/IGNORE'
Activity_method.purpose = '/IGNORE'
%^observation_activity = Activity_actual%

-- Create relationship to location of observation
Location_assignment
Location_assignment.entity_for_location -> ^observation_activity
Location_assignment.location_for_assignment -> @Where_made
Location_assignment.description = '/IGNORE'
Location_assignment.role = '/IGNORE'
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Organization_or_person_in_organization_assignment.role '/IGNORE'
Activity_actual.id '/IGNORE' Activity.id
Activity_actual.name '/IGNORE' Activity.name
Activity_actual.description '/IGNORE' Activity.description
Activity_method.name '/IGNORE'
Activity_method.description '/IGNORE'
Activity_method.consequence '/IGNORE'
Activity_method.purpose '/IGNORE'
Location_assignment.description '/IGNORE'
Location_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="observation">
   <call_template
      name="assigning_observation"
      business_context="UK_Defence">
      <param_in
         name="id"
         value="@ID">
         
      </param_in>
      <param_in
         name="id_class_name"
         value="'Observation_identification_code'">
         
      </param_in>
      <param_in
         name="id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="org_id"
         value="@ID_source_organization">
         
      </param_in>
      <param_in
         name="org_id_class_name"
         value="'Organization_identification_code'">
         
      </param_in>
      <param_in
         name="org_id_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="descr"
         value="@Description">
         
      </param_in>
      <param_in
         name="dsc_class_name"
         value="'Observation_description'">
         
      </param_in>
      <param_in
         name="dsc_ecl_id"
         value="'urn:plcs:rdl:uk_defence'">
         
      </param_in>
      <param_in
         name="date_class_name"
         value="'Date_actual_observation'">
         
      </param_in>
      <param_in
         name="date_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="year"
         value="@Made_on_year">
         
      </param_in>
      <param_in
         name="month"
         value="@Made_on_month">
         
      </param_in>
      <param_in
         name="day"
         value="@Made_on_day">
         
      </param_in>
      <param_in
         name="hour"
         value="@Made_on_hour">
         
      </param_in>
      <param_in
         name="minute"
         value="@Made_on_minute">
         
      </param_in>
      <param_in
         name="second"
         value="@Made_on_second">
         
      </param_in>
      <param_in
         name="sense"
         value="'exact'">
         
      </param_in>
      <param_in
         name="hour_offset"
         value="0">
         
      </param_in>
      <param_in
         name="minute_offset"
         value="0">
         
      </param_in>
      <param_in
         name="applies_to"
         value="@Subject ">
         
      </param_in>
   </call_template>
   <bind
      parameter="observation">
      <template_instance
         template="assigning_observation"
         parameter="observation">
         
      </template_instance>
   </bind>
   <bind
      parameter="observation_item">
      <template_instance
         template="assigning_observation"
         parameter="observation_item">
         
      </template_instance>
   </bind>
   <comment>
      Create relationship to observing person
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="items"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="observation">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="assigned_entity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="Observer">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Organization_or_person_in_organization_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <comment>
      Create notional observation activity so that a location may be assigned
   </comment>
   <instantiate
      entity="Activity_actual"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_actual"
            attribute="id"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_actual"
            attribute="name"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_actual"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <instantiate
      entity="Activity_method"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="name"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="consequence"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Activity_method"
            attribute="purpose"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <bind
      parameter="observation_activity">
      <express_entity
         entity="Activity_actual"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      Create relationship to location of observation
   </comment>
   <instantiate
      entity="Location_assignment"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="entity_for_location"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="observation_activity">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="location_for_assignment"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="Where_made">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="description"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <express_attribute
            entity="Location_assignment"
            attribute="role"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <string
            value=" '/IGNORE' ">
            
         </string>
      </source>
   </assign>
</refpath>

© UK MOD 2010 — All rights reserved