void IndividualHumanMalaria::AddClinicalSymptom(ClinicalSymptomsEnum::Enum symptom)
    {
        m_clinical_symptoms[symptom] = true;

        // Trigger observers of new clinical and severe malaria episodes
        if ( symptom == ClinicalSymptomsEnum::CLINICAL_DISEASE )
        {
            broadcaster->TriggerNodeEventObservers( GetEventContext(), IndividualEventTriggerType::NewClinicalCase );
        }
        else if ( symptom == ClinicalSymptomsEnum::SEVERE_DISEASE )
        {
            broadcaster->TriggerNodeEventObservers( GetEventContext(), IndividualEventTriggerType::NewSevereCase );
        }
    }
Beispiel #2
0
    IIndividualHuman*
    NodeSTI::processImmigratingIndividual(
        IIndividualHuman* movedind
    )
    {
        // -------------------------------------------------------------------------------
        // --- SetContextTo() is called in Node::processImmigratingIndividual() but
        // --- we need need to set context before onImmigrating().  onImmigrating() needs
        // --- the RelationshipManager which is part of the node.
        // -------------------------------------------------------------------------------
        movedind->SetContextTo(getContextPointer());

        IIndividualHumanSTI* sti_individual = nullptr;
        if (movedind->QueryInterface(GET_IID(IIndividualHumanSTI), (void**)&sti_individual) != s_OK)
        {
            throw QueryInterfaceException( __FILE__, __LINE__, __FUNCTION__, "retVal", "IIndividualSTI", "IndividualHuman" );
        }
        sti_individual->onImmigrating();

        auto retVal = Node::processImmigratingIndividual( movedind );

        event_context_host->TriggerNodeEventObservers( retVal->GetEventContext(), IndividualEventTriggerType::STIPostImmigrating );

        return retVal;
    }
Beispiel #3
0
    void IndividualHumanTB::InitializeHuman()
    {
        IndividualHuman::InitializeHuman();

        if(Environment::getInstance()->Log->CheckLogLevel(Logger::DEBUG, "EEL"))
        {
            const std::string& value = GetEventContext()->GetProperties()->Get( IPKey( "QualityOfCare" ) ).GetValueAsString();
            Environment::getInstance()->Log->LogF(Logger::DEBUG, "EEL","t=%d,hum_id=%d,new_hum_state=%d,Props=%s \n", int(parent->GetTime().time), GetSuid().data, 0, value.c_str() );
        }
    }