Interface IMasterListServiceFactory
- Namespace
- adas_core.Application.Services.Interfaces
- Assembly
- adas-core.Application.dll
public interface IMasterListServiceFactory
- Extension Methods
Methods
GetMasterListById(MasterListType, ObjectId, LocaleEnum?)
Retrieves a master list entry by its identifier and type, optionally filtered by the specified data locale.
Task<object?> GetMasterListById(MasterListType masterListType, ObjectId masterListId, LocaleEnum? dataLocale)
Parameters
masterListTypeMasterListTypeThe type of the master list to query.
masterListIdObjectIdThe unique identifier of the master list entry to retrieve.
dataLocaleLocaleEnum?The optional locale used to resolve localized data; when null, no locale filtering is applied.
Returns
- Task<object>
A task that yields the matching master list entry as an object, or null if no entry is found.
GetMasterListOptionById(MasterListType, ObjectId, ObjectId, LocaleEnum?)
Retrieves a master list option by its identifier, optionally localized to the specified data locale. Returns null if no matching option is found.
Task<object?> GetMasterListOptionById(MasterListType masterListType, ObjectId masterListId, ObjectId masterListOptionId, LocaleEnum? dataLocale)
Parameters
masterListTypeMasterListTypeThe type of master list to search within.
masterListIdObjectIdThe identifier of the master list containing the option.
masterListOptionIdObjectIdThe identifier of the master list option to retrieve.
dataLocaleLocaleEnum?The optional locale used to localize the returned option data.
Returns
GetMasterListSpecificType(MasterListType)
Gets the specific Type associated with the given master list type, mapping the master list category to its corresponding implementation type.
Type GetMasterListSpecificType(MasterListType masterListType)
Parameters
masterListTypeMasterListTypeThe master list type whose associated Type should be returned.
Returns
GetPatientTraslated(Unit?, LocaleEnum?, Patient?)
Retrieves a translated Patient based on the provided unit and locale.
Returns null when the patient, unit, or locale is not provided or no translation is found.
Task<Patient?> GetPatientTraslated(Unit? unit, LocaleEnum? locale, Patient? patient)
Parameters
unitUnitThe organizational unit context used to look up the translation. May be
null.localeLocaleEnum?The target locale for the translation. May be
null.patientPatientThe patient to be translated. May be
null.
Returns
- Task<Patient>
A Task<TResult> that resolves to the translated Patient, or
nullif no translation is available.
GetService(Type)
Gets the service object of the specified type.
object GetService(Type serviceType)
Parameters
serviceTypeTypeAn object that specifies the type of service object to get.
Returns
- object
A service object of type
serviceType, ornullif there is no service object of that type registered.
GetService(MasterListType)
Retrieves a service instance from the master list based on the specified service name.
object GetService(MasterListType serviceName)
Parameters
serviceNameMasterListTypeThe MasterListType identifier used to look up the desired service.
Returns
GetTypedMasterList(MasterListType, MasterList)
Retrieves a typed representation of the specified masterList based on the given masterListType.
object? GetTypedMasterList(MasterListType masterListType, MasterList masterList)
Parameters
masterListTypeMasterListTypeThe type that determines how the master list should be converted or filtered.
masterListMasterListThe master list to be returned in a typed form.
Returns
- object
A typed object representing the master list, or
nullif no matching type is found.
InsertMasterList(MasterListType, MasterList)
Inserts a new MasterList record based on the specified masterListType.
Task<object?> InsertMasterList(MasterListType masterListType, MasterList masterList)
Parameters
masterListTypeMasterListTypeThe type of master list to insert.
masterListMasterListThe master list entity to be inserted.
Returns
- Task<object>
A task that represents the asynchronous insert operation. The result contains the inserted master list data, or
nullif the insert was not successful.
StringNurseObs()
Retrieves a list of nurse observation entries as string values.
List<string> StringNurseObs()
Returns
UpdateMasterList(MasterListType, MasterList)
Asynchronously updates an existing master list entry based on the specified master list type and master list data.
Task<object?> UpdateMasterList(MasterListType masterListType, MasterList masterList)
Parameters
masterListTypeMasterListTypeThe type of master list to update, used to determine the target list or category.
masterListMasterListThe master list entity containing the updated data to be persisted.