Medical Appointments API

MedicalCenterService
in package

A class service for working with the logic business of medical centers.

Tags
author

Luis Graciano contacto@luisgraciano.dev

Table of Contents

$medicalCenterRepository  : MedicalCenterRepository
$municipalityRepository  : MunicipalityRepository
$provinceRepository  : ProvinceRepository
$timeZoneService  : TimeZoneService
__construct()  : mixed
MedicalCenterService constructor.
findAll()  : array<string|int, mixed>
Find all medical centers.
findById()  : MedicalCenterDomain
Find a medical center by its ID.
findByPostalCode()  : MedicalCentersByPostalCodeResponseDomain
Find all medical centers by postal code.
getMunicipalityByPostalCode()  : MunicipalityDomain
Get the municipality by postal code.
mapMedicalCenterEntitiesToDomains()  : array<string|int, mixed>
Map medical center entities to domains.
mapMedicalCenterEntityToDomain()  : MedicalCenterDomain
Map a medical center entity to a domain.

Properties

Methods

__construct()

MedicalCenterService constructor.

public __construct(MedicalCenterRepository $medicalCenterRepository, MunicipalityRepository $municipalityRepository, ProvinceRepository $provinceRepository, TimeZoneService $timeZoneService) : mixed
Parameters
$medicalCenterRepository : MedicalCenterRepository

The medical center repository.

$municipalityRepository : MunicipalityRepository

The municipality repository.

$provinceRepository : ProvinceRepository

The province repository.

$timeZoneService : TimeZoneService

The time zone service.

Return values
mixed

findAll()

Find all medical centers.

public findAll() : array<string|int, mixed>
Tags
throws
UnhandledException

If an error occurs while finding the medical centers.

Return values
array<string|int, mixed>

mapMedicalCenterEntitiesToDomains()

Map medical center entities to domains.

private mapMedicalCenterEntitiesToDomains(array<string|int, MedicalCenterEntity$data) : array<string|int, mixed>
Parameters
$data : array<string|int, MedicalCenterEntity>

The medical center entities.

Tags
throws
Exception

If an error occurs while mapping the medical center entities to domains.

Return values
array<string|int, mixed>

Search results