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
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.
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.
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.
Hi Axel Faust and Krutik Jayswal,
Thank you very much for the quick update. Will go through the documentation.
Regards,
Subbu
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
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="chsatientAssociation">
<title>Patient Association</title>
<source>
<mandatory>true</mandatory>
<many>false</many>
</source>
<target>
<class>chsatientv1</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="chsatientv1">
<title>Patient Information</title>
<parent>cm:content</parent>
<properties>
<property name="chsatientId">
<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>
Hi All,
Any help/suggestion here please?
Regards,
Subbu
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.