Hi Mathew,

I think that a unique single point  to handle all CRUD operations does not exists. Maybe you can implement in the base class some Methods Generators to handle all situations that you need.

Below the documentation of all possible callback methods: 

https://docs.intersystems.com/irisforhealth20201/csp/docbook/Doc.View.cls?KEY=GOBJ_callbacks
 

The global ^PAADMi("No", "") is a index global, if I'm not wrong ,is a index of PA_AADM table and the field of the index is PAADM_PAPMI_NO (MRN number of patient).  Maybe then idex have some problem.

Do you have access to the stored procedure code?, If yes try to execute the query of procedure manually in the System Adminstration Portal. If not, I think you will need some suport.

Hi Abel,

When we subclass a persistent class and we need that this subclass have a own storage we need to add in the inheritance class list the %Persistent class  first of all classes.

Shared storage

 Class sample.MyHL7 Extends EnsLib.HL7.Message
{ 

Storage Default
{
<Type>%Library.CacheStorage</Type>
}

}

Own storage

 Class sample.MyHL7 Extends (%Persistent, EnsLib.HL7.Message)
{ 

Storage Default
{
<Data name="MyHL7DefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>ParentId</Value>
</Value>
<Value name="3">
<Value>DocType</Value>
</Value>
<Value name="4">
<Value>Envelope</Value>
</Value>
<Value name="5">
<Value>Source</Value>
</Value>
<Value name="6">
<Value>IsMutable</Value>
</Value>
<Value name="7">
<Value>OriginalDocId</Value>
</Value>
<Value name="8">
<Value>MessageTypeCategory</Value>
</Value>
<Value name="9">
<Value>TimeCreated</Value>
</Value>
</Data>
<Data name="UserValues">
<Attribute>UserValues</Attribute>
<Structure>subnode</Structure>
<Subscript>"UserValues"</Subscript>
</Data>
<DataLocation>^sample.MyHL7D</DataLocation>
<DefaultData>MyHL7DefaultData</DefaultData>
<IdLocation>^sample.MyHL7D</IdLocation>
<IndexLocation>^sample.MyHL7I</IndexLocation>
<StreamLocation>^sample.MyHL7S</StreamLocation>
<Type>%Library.CacheStorage</Type>
} 

}

Hi Davi,

A simplest way is creating a datatype class:

 Class system.dto.sector.SectorStatusEnum Extends %Integer [ ClassType = datatype ]
{
 
Parameter DISPLAYLIST = ",Active,Inactive,Production,Upkeep,NewValue";

Parameter VALUELIST = ",1,2,3,4,5"; 

}

And use the datatype in your class:

Class system.dto.sector.Test Extends %Persistent
{ 

Property SectorStatus As SectorStatusEnum;

}

Example: