Template:— inventory_item_receipt (invntry_itm_recpt)
Context:— UK_Defence
Date: 2009/04/17 09:34:16
Revision: 1.6
Template: inventory_item_receipt

XML references to the Template

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

inventory_item_receipt

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

Set up a table of the template parameters.
<template_table figure_id="?" instance="?" name="inventory_item_receipt" context="UK_Defence" >
  <param name="date_received">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="denomination_of_quantity">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="id">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="source_organization">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="quantity_received">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="received_by">
    <param_value></param_value>
    <description></description>
  </param>
  <param name="related_item">
    <param_value></param_value>
    <description></description>
  </param>
</template_table>

Setup a template_example:
<template_example name="inventory_item_receipt">
  <param_in name="date_received" value=""/>
  <param_in name="denomination_of_quantity" value=""/>
  <param_in name="id" value=""/>
  <param_in name="source_organization" value=""/>
  <param_in name="quantity_received" value=""/>
  <param_in name="received_by" value=""/>
  <param_in name="related_item" value=""/>
</template_example>

inventory_item_receipt
/inventory_item_receipt(date_received='', denomination_of_quantity='', id='', source_organization='', quantity_received='', received_by='', related_item='')/

Path

-- quantity_received
/representing_value_with_unit(
    value=@quantity_received,
    unit=@denomination_of_quantity,
    unit_ecl_id='urn:plcs:rdl:std',
    si_unit='false')/
%^value_with_unit = $representing_value_with_unit.value%

-- inventory item receipt
Increasing_resource_event
Increasing_resource_event.quantity -> ^value_with_unit
Increasing_resource_event.resource -> @related_item
%^inc_res_event = Increasing_resource_event%

-- date_received
Date_or_date_time_assignment
%^date_received_date = Date_or_date_time_assignment%
^date_received_date.assigned_date -> @date_received
^date_received_date.role = 'inventory_item_receipt_date_received_date'
^date_received_date.items -> ^inc_res_event

-- id
/identifier(
    ID=@id,
    source_organization=@source_organization,
    type='Inventory_item_receipt_id_code',
    items=^inc_res_event )/

-- received_by
Organization_or_person_in_organization_assignment
Organization_or_person_in_organization_assignment.role = '/IGNORE'
Organization_or_person_in_organization_assignment.items -> ^inc_res_event
Organization_or_person_in_organization_assignment.assigned_entity -> @received_by

-- optional related_item_issue
-- use Resource_event_relationship relationship template
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Date_or_date_time_assignment.role 'inventory_item_receipt_date_received_date'
Organization_or_person_in_organization_assignment.role '/IGNORE'

XML representation of path

<refpath
   template="inventory_item_receipt">
   <comment>
      quantity_received
   </comment>
   <call_template
      name="representing_value_with_unit"
      business_context="UK_Defence">
      <param_in
         name="value"
         value="@quantity_received">
         
      </param_in>
      <param_in
         name="unit"
         value="@denomination_of_quantity">
         
      </param_in>
      <param_in
         name="unit_ecl_id"
         value="'urn:plcs:rdl:std'">
         
      </param_in>
      <param_in
         name="si_unit"
         value="'false'">
         
      </param_in>
   </call_template>
   <bind
      parameter="value_with_unit">
      <template_instance
         template="representing_value_with_unit"
         parameter="value">
         
      </template_instance>
   </bind>
   <comment>
      inventory item receipt
   </comment>
   <instantiate
      entity="Increasing_resource_event"
      context="UK_Defence">
      
   </instantiate>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Increasing_resource_event"
            attribute="quantity"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <bound_parameter
            name="value_with_unit">
            
         </bound_parameter>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <express_attribute
            entity="Increasing_resource_event"
            attribute="resource"
            context="UK_Defence">
            
         </express_attribute>
      </target>
      <source>
         <param_in_ref
            name="related_item">
            
         </param_in_ref>
      </source>
   </assign>
   <bind
      parameter="inc_res_event">
      <express_entity
         entity="Increasing_resource_event"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <comment>
      date_received
   </comment>
   <instantiate
      entity="Date_or_date_time_assignment"
      context="UK_Defence">
      
   </instantiate>
   <bind
      parameter="date_received_date">
      <express_entity
         entity="Date_or_date_time_assignment"
         context="UK_Defence">
         
      </express_entity>
   </bind>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="date_received_date.assigned_date">
            
         </bound_parameter>
      </target>
      <source>
         <param_in_ref
            name="date_received">
            
         </param_in_ref>
      </source>
   </assign>
   <assign
      assignment_type="equals"
      context="UK_Defence">
      <target>
         <bound_parameter
            name="date_received_date.role">
            
         </bound_parameter>
      </target>
      <source>
         <string
            value=" 'inventory_item_receipt_date_received_date' ">
            
         </string>
      </source>
   </assign>
   <assign
      assignment_type="points-to">
      <target>
         <bound_parameter
            name="date_received_date.items">
            
         </bound_parameter>
      </target>
      <source>
         <bound_parameter
            name="inc_res_event">
            
         </bound_parameter>
      </source>
   </assign>
   <comment>
      id
   </comment>
   <call_template
      name="identifier"
      business_context="UK_Defence">
      <param_in
         name="ID"
         value="@id">
         
      </param_in>
      <param_in
         name="source_organization"
         value="@source_organization">
         
      </param_in>
      <param_in
         name="type"
         value="'Inventory_item_receipt_id_code'">
         
      </param_in>
      <param_in
         name="items"
         value="^inc_res_event ">
         
      </param_in>
   </call_template>
   <comment>
      received_by
   </comment>
   <instantiate
      entity="Organization_or_person_in_organization_assignment"
      context="UK_Defence">
      
   </instantiate>
   <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>
   <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="inc_res_event">
            
         </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="received_by">
            
         </param_in_ref>
      </source>
   </assign>
   <comment>
      optional related_item_issue
   </comment>
   <comment>
      use Resource_event_relationship relationship template
   </comment>
</refpath>

© UK MOD 2010 — All rights reserved