Skip to content

Instantly share code, notes, and snippets.

@radek-baczynski
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save radek-baczynski/af6378edbe1d52ef2199 to your computer and use it in GitHub Desktop.

Select an option

Save radek-baczynski/af6378edbe1d52ef2199 to your computer and use it in GitHub Desktop.
namespace:
UseCase:
NoShowMarker:
data class: NoShowMarkerData {
Visit $visit;
construct(Visit);
}
data validator class: NoShowMarkerValidator {
isValid(NoShowMarkerData);
}
use case class: NoShowMarker {
execute(NoShowMarkerData $data)
this->validator->isValid($data);
logika:
begin
// business logic, all is done! Model consistency
new NoShow
change VisitPatient...
$response = new Response(Visit, VisitNoShow, VisitPatient);
event->dispatch('onNoShowMarker', new NoShowMarkerEvent($response))
commit();
event->dispatch('postNoShowMarker', new NoShowMarkerEvent($response))
return response;
response class: NoShowMarkerResponse {
// all propels
Visit $visit;
VisitNoShow $noShow;
Patient $patient;
}
}
NoShowRemover:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment