///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Collections.Generic;
#if !CF
using System.Runtime.Serialization;
#endif
using System.Xml.Serialization;
using Datalib;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// Entity class which represents the entity 'TblPatient'.
[Serializable]
public partial class TblPatientEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection _tblClinicInfos;
private EntityCollection _tblDiaries;
private EntityCollection _tblExaminationInfos;
private EntityCollection _tblPreClinicsInfos;
private EntityCollection _tblPregnanceInfos;
private EntityCollection _tblReferralsTos;
private EntityCollection _tblReferraltoServices;
private EntityCollection _tblTreatmentInfos;
private TblReferralFromPlaceEntity _tblReferralFromPlace;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary _customProperties;
private static Dictionary> _fieldsCustomProperties;
/// All names of fields mapped onto a relation. Usable for in-memory filtering
public static partial class MemberNames
{
/// Member name TblReferralFromPlace
public static readonly string TblReferralFromPlace = "TblReferralFromPlace";
/// Member name TblClinicInfos
public static readonly string TblClinicInfos = "TblClinicInfos";
/// Member name TblDiaries
public static readonly string TblDiaries = "TblDiaries";
/// Member name TblExaminationInfos
public static readonly string TblExaminationInfos = "TblExaminationInfos";
/// Member name TblPreClinicsInfos
public static readonly string TblPreClinicsInfos = "TblPreClinicsInfos";
/// Member name TblPregnanceInfos
public static readonly string TblPregnanceInfos = "TblPregnanceInfos";
/// Member name TblReferralsTos
public static readonly string TblReferralsTos = "TblReferralsTos";
/// Member name TblReferraltoServices
public static readonly string TblReferraltoServices = "TblReferraltoServices";
/// Member name TblTreatmentInfos
public static readonly string TblTreatmentInfos = "TblTreatmentInfos";
}
#endregion
/// Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed.
static TblPatientEntity()
{
SetupCustomPropertyHashtables();
}
/// CTor
public TblPatientEntity():base("TblPatientEntity")
{
InitClassEmpty(null, null);
}
/// CTor
/// For framework usage.
/// Fields object to set as the fields for this entity.
public TblPatientEntity(IEntityFields2 fields):base("TblPatientEntity")
{
InitClassEmpty(null, fields);
}
/// CTor
/// The custom validator object for this TblPatientEntity
public TblPatientEntity(IValidator validator):base("TblPatientEntity")
{
InitClassEmpty(validator, null);
}
/// CTor
/// PK value for TblPatient which data should be fetched into this TblPatient object
/// The entity is not fetched by this constructor. Use a DataAccessAdapter for that.
public TblPatientEntity(System.String patientId):base("TblPatientEntity")
{
InitClassEmpty(null, null);
this.PatientId = patientId;
}
/// CTor
/// PK value for TblPatient which data should be fetched into this TblPatient object
/// The custom validator object for this TblPatientEntity
/// The entity is not fetched by this constructor. Use a DataAccessAdapter for that.
public TblPatientEntity(System.String patientId, IValidator validator):base("TblPatientEntity")
{
InitClassEmpty(validator, null);
this.PatientId = patientId;
}
/// Protected CTor for deserialization
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblPatientEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblClinicInfos = (EntityCollection)info.GetValue("_tblClinicInfos", typeof(EntityCollection));
_tblDiaries = (EntityCollection)info.GetValue("_tblDiaries", typeof(EntityCollection));
_tblExaminationInfos = (EntityCollection)info.GetValue("_tblExaminationInfos", typeof(EntityCollection));
_tblPreClinicsInfos = (EntityCollection)info.GetValue("_tblPreClinicsInfos", typeof(EntityCollection));
_tblPregnanceInfos = (EntityCollection)info.GetValue("_tblPregnanceInfos", typeof(EntityCollection));
_tblReferralsTos = (EntityCollection)info.GetValue("_tblReferralsTos", typeof(EntityCollection));
_tblReferraltoServices = (EntityCollection)info.GetValue("_tblReferraltoServices", typeof(EntityCollection));
_tblTreatmentInfos = (EntityCollection)info.GetValue("_tblTreatmentInfos", typeof(EntityCollection));
_tblReferralFromPlace = (TblReferralFromPlaceEntity)info.GetValue("_tblReferralFromPlace", typeof(TblReferralFromPlaceEntity));
if(_tblReferralFromPlace!=null)
{
_tblReferralFromPlace.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// Performs the desync setup when an FK field has been changed. The entity referenced based on the FK field will be dereferenced and sync info will be removed.
/// The fieldindex.
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblPatientFieldIndex)fieldIndex)
{
case TblPatientFieldIndex.ReferralId:
DesetupSyncTblReferralFromPlace(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.
/// Name of the property.
/// Entity to set as an related entity
/// Used by prefetch path logic.
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblReferralFromPlace":
this.TblReferralFromPlace = (TblReferralFromPlaceEntity)entity;
break;
case "TblClinicInfos":
this.TblClinicInfos.Add((TblClinicInfoEntity)entity);
break;
case "TblDiaries":
this.TblDiaries.Add((TblDiaryEntity)entity);
break;
case "TblExaminationInfos":
this.TblExaminationInfos.Add((TblExaminationInfoEntity)entity);
break;
case "TblPreClinicsInfos":
this.TblPreClinicsInfos.Add((TblPreClinicsInfoEntity)entity);
break;
case "TblPregnanceInfos":
this.TblPregnanceInfos.Add((TblPregnanceInfoEntity)entity);
break;
case "TblReferralsTos":
this.TblReferralsTos.Add((TblReferralsToEntity)entity);
break;
case "TblReferraltoServices":
this.TblReferraltoServices.Add((TblReferraltoServiceEntity)entity);
break;
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// Gets the relation objects which represent the relation the fieldName specified is mapped on.
/// Name of the field mapped onto the relation of which the relation objects have to be obtained.
/// RelationCollection with relation object(s) which represent the relation the field is maped on
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// Gets the relation objects which represent the relation the fieldName specified is mapped on.
/// Name of the field mapped onto the relation of which the relation objects have to be obtained.
/// RelationCollection with relation object(s) which represent the relation the field is maped on
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblReferralFromPlace":
toReturn.Add(Relations.TblReferralFromPlaceEntityUsingReferralId);
break;
case "TblClinicInfos":
toReturn.Add(Relations.TblClinicInfoEntityUsingPatientId);
break;
case "TblDiaries":
toReturn.Add(Relations.TblDiaryEntityUsingPatientId);
break;
case "TblExaminationInfos":
toReturn.Add(Relations.TblExaminationInfoEntityUsingPatientId);
break;
case "TblPreClinicsInfos":
toReturn.Add(Relations.TblPreClinicsInfoEntityUsingPatientId);
break;
case "TblPregnanceInfos":
toReturn.Add(Relations.TblPregnanceInfoEntityUsingPatientId);
break;
case "TblReferralsTos":
toReturn.Add(Relations.TblReferralsToEntityUsingPatientId);
break;
case "TblReferraltoServices":
toReturn.Add(Relations.TblReferraltoServiceEntityUsingPatientId);
break;
case "TblTreatmentInfos":
toReturn.Add(Relations.TblTreatmentInfoEntityUsingPatientId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// Checks if the relation mapped by the property with the name specified is a one way / single sided relation. If the passed in name is null, it/ will return true if the entity has any single-sided relation
/// Name of the property which is mapped onto the relation to check, or null to check if the entity has any relation/ which is single sided
/// true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise
protected override bool CheckOneWayRelations(string propertyName)
{
int numberOfOneWayRelations = 0;
switch(propertyName)
{
case null:
return ((numberOfOneWayRelations > 0) || base.CheckOneWayRelations(null));
default:
return base.CheckOneWayRelations(propertyName);
}
}
#endif
/// Sets the internal parameter related to the fieldname passed to the instance relatedEntity.
/// Instance to set as the related entity of type entityType
/// Name of field mapped onto the relation which resolves in the instance relatedEntity
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblReferralFromPlace":
SetupSyncTblReferralFromPlace(relatedEntity);
break;
case "TblClinicInfos":
this.TblClinicInfos.Add((TblClinicInfoEntity)relatedEntity);
break;
case "TblDiaries":
this.TblDiaries.Add((TblDiaryEntity)relatedEntity);
break;
case "TblExaminationInfos":
this.TblExaminationInfos.Add((TblExaminationInfoEntity)relatedEntity);
break;
case "TblPreClinicsInfos":
this.TblPreClinicsInfos.Add((TblPreClinicsInfoEntity)relatedEntity);
break;
case "TblPregnanceInfos":
this.TblPregnanceInfos.Add((TblPregnanceInfoEntity)relatedEntity);
break;
case "TblReferralsTos":
this.TblReferralsTos.Add((TblReferralsToEntity)relatedEntity);
break;
case "TblReferraltoServices":
this.TblReferraltoServices.Add((TblReferraltoServiceEntity)relatedEntity);
break;
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)relatedEntity);
break;
default:
break;
}
}
/// Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity()
/// Instance to unset as the related entity of type entityType
/// Name of field mapped onto the relation which resolves in the instance relatedEntity
/// if set to true it will notify the manytoone side, if applicable.
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblReferralFromPlace":
DesetupSyncTblReferralFromPlace(false, true);
break;
case "TblClinicInfos":
this.PerformRelatedEntityRemoval(this.TblClinicInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblDiaries":
this.PerformRelatedEntityRemoval(this.TblDiaries, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblExaminationInfos":
this.PerformRelatedEntityRemoval(this.TblExaminationInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblPreClinicsInfos":
this.PerformRelatedEntityRemoval(this.TblPreClinicsInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblPregnanceInfos":
this.PerformRelatedEntityRemoval(this.TblPregnanceInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblReferralsTos":
this.PerformRelatedEntityRemoval(this.TblReferralsTos, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblReferraltoServices":
this.PerformRelatedEntityRemoval(this.TblReferraltoServices, relatedEntity, signalRelatedEntityManyToOne);
break;
case "TblTreatmentInfos":
this.PerformRelatedEntityRemoval(this.TblTreatmentInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// Gets a collection of related entities referenced by this entity which depend on this entity (this entity is the PK side of their FK fields). These entities will have to be persisted after this entity during a recursive save.
/// Collection with 0 or more IEntity2 objects, referenced by this entity
protected override List GetDependingRelatedEntities()
{
List toReturn = new List();
return toReturn;
}
/// Gets a collection of related entities referenced by this entity which this entity depends on (this entity is the FK side of their PK fields). These
/// entities will have to be persisted before this entity during a recursive save.
/// Collection with 0 or more IEntity2 objects, referenced by this entity
protected override List GetDependentRelatedEntities()
{
List toReturn = new List();
if(_tblReferralFromPlace!=null)
{
toReturn.Add(_tblReferralFromPlace);
}
return toReturn;
}
/// Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.
/// Collection with 0 or more IEntityCollection2 objects, referenced by this entity
protected override List GetMemberEntityCollections()
{
List toReturn = new List();
toReturn.Add(this.TblClinicInfos);
toReturn.Add(this.TblDiaries);
toReturn.Add(this.TblExaminationInfos);
toReturn.Add(this.TblPreClinicsInfos);
toReturn.Add(this.TblPregnanceInfos);
toReturn.Add(this.TblReferralsTos);
toReturn.Add(this.TblReferraltoServices);
toReturn.Add(this.TblTreatmentInfos);
return toReturn;
}
/// ISerializable member. Does custom serialization so event handlers do not get serialized. Serializes members of this entity class and uses the base class' implementation to serialize the rest.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblClinicInfos", ((_tblClinicInfos!=null) && (_tblClinicInfos.Count>0) && !this.MarkedForDeletion)?_tblClinicInfos:null);
info.AddValue("_tblDiaries", ((_tblDiaries!=null) && (_tblDiaries.Count>0) && !this.MarkedForDeletion)?_tblDiaries:null);
info.AddValue("_tblExaminationInfos", ((_tblExaminationInfos!=null) && (_tblExaminationInfos.Count>0) && !this.MarkedForDeletion)?_tblExaminationInfos:null);
info.AddValue("_tblPreClinicsInfos", ((_tblPreClinicsInfos!=null) && (_tblPreClinicsInfos.Count>0) && !this.MarkedForDeletion)?_tblPreClinicsInfos:null);
info.AddValue("_tblPregnanceInfos", ((_tblPregnanceInfos!=null) && (_tblPregnanceInfos.Count>0) && !this.MarkedForDeletion)?_tblPregnanceInfos:null);
info.AddValue("_tblReferralsTos", ((_tblReferralsTos!=null) && (_tblReferralsTos.Count>0) && !this.MarkedForDeletion)?_tblReferralsTos:null);
info.AddValue("_tblReferraltoServices", ((_tblReferraltoServices!=null) && (_tblReferraltoServices.Count>0) && !this.MarkedForDeletion)?_tblReferraltoServices:null);
info.AddValue("_tblTreatmentInfos", ((_tblTreatmentInfos!=null) && (_tblTreatmentInfos.Count>0) && !this.MarkedForDeletion)?_tblTreatmentInfos:null);
info.AddValue("_tblReferralFromPlace", (!this.MarkedForDeletion?_tblReferralFromPlace:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// Gets a list of all the EntityRelation objects the type of this instance has.
/// A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.
protected override List GetAllRelations()
{
return new TblPatientRelations().GetAllRelations();
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblClinicInfo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblClinicInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblClinicInfoFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblDiary' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblDiaries()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblDiaryFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblExaminationInfo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblExaminationInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblExaminationInfoFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblPreClinicsInfo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblPreClinicsInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPreClinicsInfoFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblPregnanceInfo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblPregnanceInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPregnanceInfoFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblReferralsTo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblReferralsTos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblReferralsToFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblReferraltoService' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblReferraltoServices()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblReferraltoServiceFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblTreatmentInfo' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblTreatmentInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTreatmentInfoFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblReferralFromPlace' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblReferralFromPlace()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblReferralFromPlaceFields.ReferralId, null, ComparisonOperator.Equal, this.ReferralId));
return bucket;
}
/// Creates a new instance of the factory related to this entity
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory));
}
#if !CF
/// Adds the member collections to the collections queue (base first)
/// The collections queue.
protected override void AddToMemberEntityCollectionsQueue(Queue collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblClinicInfos);
collectionsQueue.Enqueue(this._tblDiaries);
collectionsQueue.Enqueue(this._tblExaminationInfos);
collectionsQueue.Enqueue(this._tblPreClinicsInfos);
collectionsQueue.Enqueue(this._tblPregnanceInfos);
collectionsQueue.Enqueue(this._tblReferralsTos);
collectionsQueue.Enqueue(this._tblReferraltoServices);
collectionsQueue.Enqueue(this._tblTreatmentInfos);
}
/// Gets the member collections queue from the queue (base first)
/// The collections queue.
protected override void GetFromMemberEntityCollectionsQueue(Queue collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblClinicInfos = (EntityCollection) collectionsQueue.Dequeue();
this._tblDiaries = (EntityCollection) collectionsQueue.Dequeue();
this._tblExaminationInfos = (EntityCollection) collectionsQueue.Dequeue();
this._tblPreClinicsInfos = (EntityCollection) collectionsQueue.Dequeue();
this._tblPregnanceInfos = (EntityCollection) collectionsQueue.Dequeue();
this._tblReferralsTos = (EntityCollection) collectionsQueue.Dequeue();
this._tblReferraltoServices = (EntityCollection) collectionsQueue.Dequeue();
this._tblTreatmentInfos = (EntityCollection) collectionsQueue.Dequeue();
}
/// Determines whether the entity has populated member collections
/// true if the entity has populated member collections.
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblClinicInfos != null);
toReturn |=(this._tblDiaries != null);
toReturn |=(this._tblExaminationInfos != null);
toReturn |=(this._tblPreClinicsInfos != null);
toReturn |=(this._tblPregnanceInfos != null);
toReturn |=(this._tblReferralsTos != null);
toReturn |=(this._tblReferraltoServices != null);
toReturn |=(this._tblTreatmentInfos != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// Creates the member entity collections queue.
/// The collections queue.
/// The required queue.
protected override void CreateMemberEntityCollectionsQueue(Queue collectionsQueue, Queue requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblClinicInfoEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblDiaryEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblExaminationInfoEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPreClinicsInfoEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPregnanceInfoEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblReferralsToEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblReferraltoServiceEntityFactory))) : null);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))) : null);
}
#endif
/// Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.
/// Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null
protected override Dictionary GetRelatedData()
{
Dictionary toReturn = new Dictionary();
toReturn.Add("TblReferralFromPlace", _tblReferralFromPlace);
toReturn.Add("TblClinicInfos", _tblClinicInfos);
toReturn.Add("TblDiaries", _tblDiaries);
toReturn.Add("TblExaminationInfos", _tblExaminationInfos);
toReturn.Add("TblPreClinicsInfos", _tblPreClinicsInfos);
toReturn.Add("TblPregnanceInfos", _tblPregnanceInfos);
toReturn.Add("TblReferralsTos", _tblReferralsTos);
toReturn.Add("TblReferraltoServices", _tblReferraltoServices);
toReturn.Add("TblTreatmentInfos", _tblTreatmentInfos);
return toReturn;
}
/// Initializes the class members
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// Initializes the hashtables for the entity type and entity field custom properties.
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary();
_fieldsCustomProperties = new Dictionary>();
Dictionary fieldHashtable;
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Address", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("BirthYear", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("CommuneId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("CreateDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("DateofArv", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("DateofReceivingDrug", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Dateofreferral", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("DateofRegistration", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("DeathDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("DistrictId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("HaveArvBefore", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("HivConfirmedDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("IdentityCardNo", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Insuranceid", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ModifyDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("OldPatientId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("PatientName", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReferralId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReferralName", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReferralProvinceId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Regimenid", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Sex", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Sms", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("SupporterInfo", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("TelephoneNo", fieldHashtable);
}
#endregion
/// Removes the sync logic for member _tblReferralFromPlace
/// If set to true, it will call the related entity's UnsetRelatedEntity method
/// if set to true it will also reset the FK fields pointing to the related entity
private void DesetupSyncTblReferralFromPlace(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblReferralFromPlace, new PropertyChangedEventHandler( OnTblReferralFromPlacePropertyChanged ), "TblReferralFromPlace", Datalib.RelationClasses.StaticTblPatientRelations.TblReferralFromPlaceEntityUsingReferralIdStatic, true, signalRelatedEntity, "TblPatients", resetFKFields, new int[] { (int)TblPatientFieldIndex.ReferralId } );
_tblReferralFromPlace = null;
}
/// setups the sync logic for member _tblReferralFromPlace
/// Instance to set as the related entity of type entityType
private void SetupSyncTblReferralFromPlace(IEntityCore relatedEntity)
{
if(_tblReferralFromPlace!=relatedEntity)
{
DesetupSyncTblReferralFromPlace(true, true);
_tblReferralFromPlace = (TblReferralFromPlaceEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblReferralFromPlace, new PropertyChangedEventHandler( OnTblReferralFromPlacePropertyChanged ), "TblReferralFromPlace", Datalib.RelationClasses.StaticTblPatientRelations.TblReferralFromPlaceEntityUsingReferralIdStatic, true, new string[] { } );
}
}
/// Handles property change events of properties in a related entity.
///
///
private void OnTblReferralFromPlacePropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// Initializes the class with empty data, as if it is a new Entity.
/// The validator object for this TblPatientEntity
/// Fields of this entity
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
#region Class Property Declarations
/// The relations object holding all relations of this entity with other entity classes.
public static TblPatientRelations Relations
{
get { return new TblPatientRelations(); }
}
/// The custom properties for this entity type.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
public static Dictionary CustomProperties
{
get { return _customProperties;}
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblClinicInfo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblClinicInfos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblClinicInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblClinicInfos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblClinicInfoEntity, 0, null, null, null, null, "TblClinicInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblDiary' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblDiaries
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblDiaryEntityFactory))), (IEntityRelation)GetRelationsForField("TblDiaries")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblDiaryEntity, 0, null, null, null, null, "TblDiaries", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblExaminationInfo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblExaminationInfos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblExaminationInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblExaminationInfos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblExaminationInfoEntity, 0, null, null, null, null, "TblExaminationInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPreClinicsInfo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblPreClinicsInfos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPreClinicsInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblPreClinicsInfos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblPreClinicsInfoEntity, 0, null, null, null, null, "TblPreClinicsInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPregnanceInfo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblPregnanceInfos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPregnanceInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblPregnanceInfos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblPregnanceInfoEntity, 0, null, null, null, null, "TblPregnanceInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblReferralsTo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblReferralsTos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblReferralsToEntityFactory))), (IEntityRelation)GetRelationsForField("TblReferralsTos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblReferralsToEntity, 0, null, null, null, null, "TblReferralsTos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblReferraltoService' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblReferraltoServices
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblReferraltoServiceEntityFactory))), (IEntityRelation)GetRelationsForField("TblReferraltoServices")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblReferraltoServiceEntity, 0, null, null, null, null, "TblReferraltoServices", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTreatmentInfo' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblTreatmentInfos
{
get { return new PrefetchPathElement2( new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblTreatmentInfos")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblTreatmentInfoEntity, 0, null, null, null, null, "TblTreatmentInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblReferralFromPlace' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblReferralFromPlace
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblReferralFromPlaceEntityFactory))), (IEntityRelation)GetRelationsForField("TblReferralFromPlace")[0], (int)Datalib.EntityType.TblPatientEntity, (int)Datalib.EntityType.TblReferralFromPlaceEntity, 0, null, null, null, null, "TblReferralFromPlace", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// The custom properties for the type of this entity instance.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
[Browsable(false), XmlIgnore]
protected override Dictionary CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
public static Dictionary> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// The custom properties for the fields of the type of this entity instance. The returned Hashtable contains per fieldname a hashtable of name-value pairs.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
[Browsable(false), XmlIgnore]
protected override Dictionary> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// The Address property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."Address"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String Address
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.Address, true); }
set { SetValue((int)TblPatientFieldIndex.Address, value); }
}
/// The BirthYear property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."BirthYear"
/// Table field type characteristics (type, precision, scale, length): Integer, 10, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false
public virtual System.Int32 BirthYear
{
get { return (System.Int32)GetValue((int)TblPatientFieldIndex.BirthYear, true); }
set { SetValue((int)TblPatientFieldIndex.BirthYear, value); }
}
/// The CommuneId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."CommuneID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 7
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String CommuneId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.CommuneId, true); }
set { SetValue((int)TblPatientFieldIndex.CommuneId, value); }
}
/// The CreateDate property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."CreateDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable CreateDate
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.CreateDate, false); }
set { SetValue((int)TblPatientFieldIndex.CreateDate, value); }
}
/// The DateofArv property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."DateofARV"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable DateofArv
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.DateofArv, false); }
set { SetValue((int)TblPatientFieldIndex.DateofArv, value); }
}
/// The DateofReceivingDrug property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."DateofReceivingDrug"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable DateofReceivingDrug
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.DateofReceivingDrug, false); }
set { SetValue((int)TblPatientFieldIndex.DateofReceivingDrug, value); }
}
/// The Dateofreferral property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."Dateofreferral"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable Dateofreferral
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.Dateofreferral, false); }
set { SetValue((int)TblPatientFieldIndex.Dateofreferral, value); }
}
/// The DateofRegistration property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."DateofRegistration"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable DateofRegistration
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.DateofRegistration, false); }
set { SetValue((int)TblPatientFieldIndex.DateofRegistration, value); }
}
/// The DeathDate property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."DeathDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable DeathDate
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.DeathDate, false); }
set { SetValue((int)TblPatientFieldIndex.DeathDate, value); }
}
/// The DistrictId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."DistrictID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 5
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String DistrictId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.DistrictId, true); }
set { SetValue((int)TblPatientFieldIndex.DistrictId, value); }
}
/// The HaveArvBefore property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."HaveArvBefore"
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable HaveArvBefore
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.HaveArvBefore, false); }
set { SetValue((int)TblPatientFieldIndex.HaveArvBefore, value); }
}
/// The HivConfirmedDate property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."HivConfirmedDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable HivConfirmedDate
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.HivConfirmedDate, false); }
set { SetValue((int)TblPatientFieldIndex.HivConfirmedDate, value); }
}
/// The IdentityCardNo property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."IdentityCardNo"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 20
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String IdentityCardNo
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.IdentityCardNo, true); }
set { SetValue((int)TblPatientFieldIndex.IdentityCardNo, value); }
}
/// The Insuranceid property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."insuranceid"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 50
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String Insuranceid
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.Insuranceid, true); }
set { SetValue((int)TblPatientFieldIndex.Insuranceid, value); }
}
/// The ModifyDate property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."ModifyDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable ModifyDate
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.ModifyDate, false); }
set { SetValue((int)TblPatientFieldIndex.ModifyDate, value); }
}
/// The OldPatientId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."OldPatientID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String OldPatientId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.OldPatientId, true); }
set { SetValue((int)TblPatientFieldIndex.OldPatientId, value); }
}
/// The PatientId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."PatientID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.PatientId, true); }
set { SetValue((int)TblPatientFieldIndex.PatientId, value); }
}
/// The PatientName property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."PatientName"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String PatientName
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.PatientName, true); }
set { SetValue((int)TblPatientFieldIndex.PatientName, value); }
}
/// The ProvinceId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."ProvinceID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.ProvinceId, true); }
set { SetValue((int)TblPatientFieldIndex.ProvinceId, value); }
}
/// The ReferralId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."ReferralID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ReferralId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.ReferralId, true); }
set { SetValue((int)TblPatientFieldIndex.ReferralId, value); }
}
/// The ReferralName property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."ReferralName"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ReferralName
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.ReferralName, true); }
set { SetValue((int)TblPatientFieldIndex.ReferralName, value); }
}
/// The ReferralProvinceId property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."ReferralProvinceID"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ReferralProvinceId
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.ReferralProvinceId, true); }
set { SetValue((int)TblPatientFieldIndex.ReferralProvinceId, value); }
}
/// The Regimenid property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."Regimenid"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String Regimenid
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.Regimenid, true); }
set { SetValue((int)TblPatientFieldIndex.Regimenid, value); }
}
/// The Sex property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."Sex"
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false
public virtual System.Int16 Sex
{
get { return (System.Int16)GetValue((int)TblPatientFieldIndex.Sex, true); }
set { SetValue((int)TblPatientFieldIndex.Sex, value); }
}
/// The Sms property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."SMS"
/// Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false
public virtual Nullable Sms
{
get { return (Nullable)GetValue((int)TblPatientFieldIndex.Sms, false); }
set { SetValue((int)TblPatientFieldIndex.Sms, value); }
}
/// The Status property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."Status"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String Status
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.Status, true); }
set { SetValue((int)TblPatientFieldIndex.Status, value); }
}
/// The SupporterInfo property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."SupporterInfo"
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String SupporterInfo
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.SupporterInfo, true); }
set { SetValue((int)TblPatientFieldIndex.SupporterInfo, value); }
}
/// The TelephoneNo property of the Entity TblPatient
/// Mapped on table field: "tblPatients"."TelephoneNo"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 20
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String TelephoneNo
{
get { return (System.String)GetValue((int)TblPatientFieldIndex.TelephoneNo, true); }
set { SetValue((int)TblPatientFieldIndex.TelephoneNo, value); }
}
/// Gets the EntityCollection with the related entities of type 'TblClinicInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblClinicInfoEntity))]
public virtual EntityCollection TblClinicInfos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblClinicInfos); }
}
/// Gets the EntityCollection with the related entities of type 'TblDiaryEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblDiaryEntity))]
public virtual EntityCollection TblDiaries
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblDiaries); }
}
/// Gets the EntityCollection with the related entities of type 'TblExaminationInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblExaminationInfoEntity))]
public virtual EntityCollection TblExaminationInfos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblExaminationInfos); }
}
/// Gets the EntityCollection with the related entities of type 'TblPreClinicsInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblPreClinicsInfoEntity))]
public virtual EntityCollection TblPreClinicsInfos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblPreClinicsInfos); }
}
/// Gets the EntityCollection with the related entities of type 'TblPregnanceInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblPregnanceInfoEntity))]
public virtual EntityCollection TblPregnanceInfos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblPregnanceInfos); }
}
/// Gets the EntityCollection with the related entities of type 'TblReferralsToEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblReferralsToEntity))]
public virtual EntityCollection TblReferralsTos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblReferralsTos); }
}
/// Gets the EntityCollection with the related entities of type 'TblReferraltoServiceEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblReferraltoServiceEntity))]
public virtual EntityCollection TblReferraltoServices
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblReferraltoServices); }
}
/// Gets the EntityCollection with the related entities of type 'TblTreatmentInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.
[TypeContainedAttribute(typeof(TblTreatmentInfoEntity))]
public virtual EntityCollection TblTreatmentInfos
{
get { return GetOrCreateEntityCollection("TblPatient", true, false, ref _tblTreatmentInfos); }
}
/// Gets / sets related entity of type 'TblReferralFromPlaceEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..
[Browsable(false)]
public virtual TblReferralFromPlaceEntity TblReferralFromPlace
{
get { return _tblReferralFromPlace; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblReferralFromPlace(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblPatients", "TblReferralFromPlace", _tblReferralFromPlace, true);
}
}
}
/// Gets the type of the hierarchy this entity is in.
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// Gets or sets a value indicating whether this entity is a subtype
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// Returns the Datalib.EntityType enum value for this entity.
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblPatientEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}