Examples of Hospital


Examples of com.wordpress.salaboy.model.Hospital

    @Override
    public void accumulate(Serializable context, Object value) {
        ContextData contextData = (ContextData)context;
       
        HospitalDistanceCalculationData data = (HospitalDistanceCalculationData)value;
        Hospital currentHospital = data.getHospital();
        Emergency emergency = data.getEmergency();
       
        float difX = currentHospital.getX() - xs[emergency.getLocation().getLocationX()];
        float difY = currentHospital.getY() - ys[emergency.getLocation().getLocationY()];
       
        double difTotal = Math.sqrt(Math.pow(((double)difX),2d) + Math.pow(((double)difY),2d));
       
        if(contextData.selectedHospital == null || difTotal < contextData.minDistance){
            contextData.minDistance = difTotal;
View Full Code Here

Examples of com.wordpress.salaboy.model.Hospital

        assertEquals(0, persistenceService.getAllEmergencies().size());
        persistenceService.storeEmergency(emergency);
        assertEquals(1, persistenceService.getAllEmergencies().size());
        trackingService.attachEmergency(call.getId(), emergency.getId());
       
        persistenceService.storeHospital(new Hospital("My Hospital", 12, 1));
        assertEquals(0, persistenceService.getAllVehicles().size());
        ambulance1 = new Ambulance("My Ambulance Number 1");
        persistenceService.storeVehicle(ambulance1);
        ambulance2 = new Ambulance("My Ambulance Number 2");
        persistenceService.storeVehicle(ambulance2);
View Full Code Here

Examples of com.wordpress.salaboy.model.Hospital

        //The process didn't finish yet
        assertEquals(0, proceduresEndedCount);

        //The vehicle reaches the hospital
        ProceduresMGMTService.getInstance().notifyProcedures(MessageToEventConverter.convertMessageToEvent(new VehicleHitsHospitalMessage(ambulance1.getId(), new Hospital("Hospital A", 0, 0), emergency.getId(), new Date())));

        Thread.sleep(5000);

        //The emergency has ended
        assertEquals(1, proceduresEndedCount);
View Full Code Here

Examples of fing.satode.dominio.Hospital

  public void nuevoPuntoReferencia(PuntoReferencia puntoReferencia) {
    switch (puntoReferencia.getTipo())
    {
    case TipoPuntoReferencia.HOSPITAL:
      Hospital hospital = (Hospital) puntoReferencia;
      sess().save(hospital);
    break;
    case TipoPuntoReferencia.REFUGIO:
      Refugio refugio = (Refugio) puntoReferencia;
      sess().save(refugio);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.