Adding ISCO 88 Job Codes to iHRIS Manage

From IHRIS Wiki

The ISCO 88 Job Codes can be found here and represent an international standard for classifying jobs. They are broken up hierachically into major, sub-major , minor groups under which the job codes (called unit) are under the minor groups.

We will create a module for each of the major groups, all of which will sit under a meta-module.

Getting The Data

The data file can be found in the launchpad bzr repository for I2CE

Creating The XML Magic(Configuration) Data

The ISCO 88 codes are going to be separated into 10 different xml files, each representing a major group. Each xml file will contain the number and description of the major number followed by all the sub-major, minor, and then unit. The php code is provided here and needs to be in the same directory as the isco88 codes file to run.

Creating The Modules

Since this data is related to Jobs in iHRIS Manage, we will put everything as sub-modules under the ihris-manage-Job. This can be found in the directory:

[BASE INSTALLATION PATH]/ihris-manage/modules/ManageJob

All instructions below assume that you are in this directory.

The first thing we will need to do is to enable sub-modules for ihris-manage-Job (you may wish to read the module structure overview before proceeding). To do this

gedit Job.xml

and make sure the following lines are in the appropriate place in the metadata section: <source lang='xml'> <path name='modules'>

 <value>./modules</value>

</path> </source> Now we add the modules directory

mkdir modules

Creating The Meta-Module

We will create a meta-module to contain general information about the ISCO Codes

cd [BASE INSTALLATION PATH]/ihris-manage/modules/ManageJob/modules
mkdir isco_88
cd isco_88
mkdir modules
gedit ISCO_88.xml

Add the following contents and save: <source lang='xml'> <?xml version="1.0"?> <!DOCTYPE I2CEConfiguration SYSTEM "I2CE_Configuration.dtd"> <I2CEConfiguration name='isco-88'>

 <metadata>
   <displayName>ISCO 88 Job Codes</displayName>   
   <description>The ISCO 88 Job Codes</description>
   <version>3.2.0</version>
   <path name='modules'>
     <value>./modules</value>
   </path>
</metadata>
<configurationGroup name='isco-88' path='/'>
  <configurationGroup name='isco_88_forms' path='/modules/forms/formClasses'>
       <configurationGroup name='iHRIS_ISCO_88_Major'>
         <configuration name="extends">
           <value>I2CE_List</value>
         </configuration>
         <configurationGroup name="fields">
           <configurationGroup name="name">
             <configuration name="formfield">
               <value>STRING_LINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Major Group</value>
             </configuration>
             <configuration name="required" type="boolean">
               <value>true</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="description">
             <configuration name="formfield">
               <value>STRING_MLINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Description</value>
             </configuration>
           </configurationGroup>
         </configurationGroup>
       </configurationGroup>
       <configurationGroup name='iHRIS_ISCO_88_Sub_Major'>
         <configuration name="extends">
           <value>I2CE_List</value>
         </configuration>
         <configurationGroup name="fields">
           <configurationGroup name="name">
             <configuration name="formfield">
               <value>STRING_LINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Sub-Major Group</value>
             </configuration>
             <configuration name="required" type="boolean">
               <value>true</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="description">
             <configuration name="formfield">
               <value>STRING_MLINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Description</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="isco_88_major">
             <configuration name="formfield">
               <value>MAP</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Major Group</value>
             </configuration>
           </configurationGroup>
         </configurationGroup>
       </configurationGroup>
       <configurationGroup name='iHRIS_ISCO_88_Minor'>
         <configurationGroup name="fields">
           <configurationGroup name="name">
             <configuration name="formfield">
               <value>STRING_LINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Minor Group</value>
             </configuration>
             <configuration name="required" type="boolean">
               <value>true</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="description">
             <configuration name="formfield">
               <value>STRING_MLINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Description</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="isco_88_sub_major">
             <configuration name="formfield">
               <value>MAP</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Sub-Major Group</value>
             </configuration>
           </configurationGroup>
         </configurationGroup>
       </configurationGroup>
       <configurationGroup name='iHRIS_ISCO_88_Unit'>
         <configurationGroup name="fields">
           <configurationGroup name="name">
             <configuration name="formfield">
               <value>STRING_LINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Unit</value>
             </configuration>
             <configuration name="required" type="boolean">
               <value>true</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="description">
             <configuration name="formfield">
               <value>STRING_LINE</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Description</value>
             </configuration>
           </configurationGroup>
           <configurationGroup name="isco_88_sub_major">
             <configuration name="formfield">
               <value>MAP</value>
             </configuration>
             <configuration name="headers" type="delimited">
               <value>default:Minor Group</value>
             </configuration>
           </configurationGroup>
         </configurationGroup>
       </configurationGroup>
   </configurationGroup>


  <configurationGroup name='isco_88_forms' path='/modules/forms/forms'>
       <configurationGroup name='isco_88_major'>
         <configuration name='class' values='single'>
           <value>iHRIS_ISCO_88_Major</value>
         </configuration>
         <configuration name='display' values='single'>
           <value>ISCO 88 Major</value>
         </configuration>
         <configuration name="storage" values='single'>
           <value>iHRIS_ISCO_88_Sub_Major</value>
         </configuration>
         <configuration name='display' values='single'>
           <value>ISCO 88 Sub-Major</value>
         </configuration>
         <configuration name="storage" values='single'>
           <value>iHRIS_ISCO_88_Minor</value>
         </configuration>
         <configuration name='display' values='single'>
           <value>ISCO 88 Minor</value>
         </configuration>
         <configuration name="storage" values='single'>
           <value>magicdata</value>
         </configuration>
       </configurationGroup>
       <configurationGroup name='isco_88_unit'>
         <configuration name='class' values='single'>
           <value>iHRIS_ISCO_88_Unit</value>
         </configuration>
         <configuration name='display' values='single'>
           <value>ISCO 88 Unit</value>
         </configuration>
         <configuration name="storage" values='single'>
           <value>magicdata</value>
         </configuration>
       </configurationGroup>
    </configurationGroup>



  <configurationGroup name='isco_88_field' path='/modules/forms/formClasses/iHRIS_Job/fields/isco_88_unit'>
    <configuration name="formfield">
      <value>MAP</value>
    </configuration>
    <configuration name="headers" type="delimited">
      <value>default:ISCO 88 Code</value>
    </configuration>
    <configurationGroup name="display">
      <configurationGroup name="default">
        <configuration name="fields">
          <value>isco_88_unit:[isco_88_minor]:[isco_88_sub_major]:[isco_88_major]</value>
        </configuration>
      </configurationGroup>
    </configurationGroup>
  </configurationGroup>
</configurationGroup>

</I2CEConfiguration> </source>

Creating The Sub-Modules

We are going to create a sub-module for each of the Major Groups.

The template for the configuration file is: <source lang='xml'> <?xml version="1.0"?> <!DOCTYPE I2CEConfiguration SYSTEM "I2CE_Configuration.dtd"> <I2CEConfiguration name='isco-88-major-XX'>

 <metadata>
   <displayName>ISCO 88 Job Codes</displayName>   
   <description>The ISCO 88 Job Codes</description>
   <version>3.2.0</version>
   <requirement name='isco-88'> 
      <atLeast version='3.2'/>
      <lessThan version='3.3'/>
   </requirement>
</metadata>
<configurationGroup name='isco-88-major-XX' path='/'> 
</configurationGroup>

</I2CEConfiguration> </source> where XX is the Major Group number.

For each Major Group number XX, we will do:

mkdir [BASE INSTALLATION PATH]/ihris-manage/modules/ManageJob/modules/isco_88/modules/isco_88_major_XX

and put the generated configuration file in this directory.