Comeplex Object definition in Alfresco Share

cancel
Showing results for 
Search instead for 
Did you mean: 
subbu_bv
Member II

Comeplex Object definition in Alfresco Share

Hi ,

    I am new to alfresco. I wanted to create a complex object like

  

Case

   - Case number

   - Patient (1..1)

              - Patient ID

              - Patient Age

   - Drug (1..n)

              - Drug Name

              - Drug dosage

Can anyone help me how to achieve this?

Regards,

Subbu

6 Replies
afaust
Master

Re: Comeplex Object definition in Alfresco Share

Alfresco does not have a concept for "complex objects". You would create this by simply modelling each consituent part / type, and then create (child) associations between them with the multiplicity you documented. A few years ago, the concept of "compound types" was on the roadmap, but it did not make the cut when Alfresco was prioritising its development effort.

krutik_jayswal
Senior Member II

Re: Comeplex Object definition in Alfresco Share

First thing which you should do is study the content model part of alfresco.

There are few things which you need to understand briefly which are as below.

  1. Type
  2. Aspects
  3. Property
  4. Association

Some good links are as below.

Content modeling | Alfresco Documentation 

Content Model Tutorials | Alfresco Documentation 

For your structure you need to create it as below.

  • Create Case,Patient and Drug as a type of document
  • Patient Type will have patient id and patient age as property.
  • Drug Type will have drug name as a property and a suggestion would be drug dosage should be part of Case type.
  • Case type will have an association with patient type and drug type.
subbu_bv
Member II

Re: Comeplex Object definition in Alfresco Share

Hi Axel Faust and Krutik Jayswal,

Thank you very much for the quick update. Will go through the documentation.

 

Regards,

Subbu

subbu_bv
Member II

Re: Comeplex Object definition in Alfresco Share

Hi Krutik Jayswal‌,

I have created a case type having association with patient type and drug type. I have created a Model from the model manager of the type case. When When I goto the CaseModel Layout Designer, I am not able to see the attributes from the associations. (I case see only case number not the patient name or the drug name)

How Should we do that ?

Regards,

Subbu

subbu_bv
Member II

Re: Comeplex Object definition in Alfresco Share

here is the strucutre of the case 

<type name="chs:casev1">
      <title>Case Document</title>
      <parent>cm:content</parent>
      <properties>
            <property name="chs:caseNumber">
                  <title>Case Number</title>
                  <type>d:text</type>
         </property>
   </properties>
   <associations>
            <association name="chsSmiley TongueatientAssociation">
            <title>Patient Association</title>
            <source>
                     <mandatory>true</mandatory>
                      <many>false</many>
             </source>
            <target>
                        <class>chsSmiley Tongueatientv1</class>
                        <mandatory>true</mandatory>
                        <many>false</many>
               </target>
         </association>
         <association name="chs:drugAssociation">
                  <title>Drugs Association</title>
                  <source>
                        <mandatory>true</mandatory>
                        <many>false</many>
                  </source>
                  <target>
                              <class>chs:drugv1</class>
                              <mandatory>true</mandatory>
                              <many>true</many>
                  </target>
            </association>
   </associations>
</type>

<type name="chsSmiley Tongueatientv1">
      <title>Patient Information</title>
      <parent>cm:content</parent>
        <properties>
                  <property name="chsSmiley TongueatientId">
                  <type>d:text</type>
                  <multiple>false</multiple>
         </property>

</type>

<type name="chs:drugv1">
            <title>Drug Information</title>
            <parent>cm:content</parent>
            <properties>
                     <property name="chs:drugName">
                     <type>d:text</type>
                     <multiple>false</multiple>
            </property>

</type>

subbu_bv
Member II

Re: Comeplex Object definition in Alfresco Share

Hi All, 

        Any help/suggestion here please?

Regards,

Subbu