Exemple #1
0
        public override void ViewAppeared()
        {
            var clientJson          = _settings.GetValue("client.dto", "");
            var indexClientJson     = _settings.GetValue("ptclientIndex", "");
            var clientEncounterJson = _settings.GetValue("client.encounter", "");
            var encounterTypeId     = _settings.GetValue("encounterTypeId", "");

            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }

            if (null == IndexClient && !string.IsNullOrWhiteSpace(indexClientJson))
            {
                IndexClient = JsonConvert.DeserializeObject <IndexClientDTO>(indexClientJson);
            }

            if (EncounterTypeId.IsNullOrEmpty() && !string.IsNullOrWhiteSpace(encounterTypeId))
            {
                EncounterTypeId = new Guid(encounterTypeId);
            }


            if (null == Encounter && !string.IsNullOrWhiteSpace(clientEncounterJson))
            {
                Encounter = JsonConvert.DeserializeObject <Encounter>(clientEncounterJson);
            }
        }
Exemple #2
0
        public override void ViewAppeared()
        {
            var clientJson          = _settings.GetValue("client.dto", "");
            var clientEncounterJson = _settings.GetValue("client.encounter", "");
            var encounterTypeId     = _settings.GetValue("encounterTypeId", "");

            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }

            if (EncounterTypeId.IsNullOrEmpty() && !string.IsNullOrWhiteSpace(encounterTypeId))
            {
                EncounterTypeId = new Guid(encounterTypeId);
            }

            if (null == Encounter && !string.IsNullOrWhiteSpace(clientEncounterJson))
            {
                Encounter = JsonConvert.DeserializeObject <Encounter>(clientEncounterJson);
            }

            if (null != Client && !Client.CanBeLinked())
            {
                LinkedToCareViewModel.ErrorSummary = "Client Cannot be linked to Care !";
                LinkedToCareViewModel.Validator.AddRule(
                    () => RuleResult.Assert(
                        Client.CanBeLinked(),
                        $"Client Cannot be linked to Care !"
                        )
                    );
            }
        }
        public override void ViewAppeared()
        {
            var clientJson          = _settings.GetValue("client.dto", "");
            var indexClientJson     = _settings.GetValue("clientIndex", "");
            var clientEncounterJson = _settings.GetValue("client.encounter", "");
            var encounterTypeId     = _settings.GetValue("encounterTypeId", "");

            var hivstatusJson   = _settings.GetValue("lookup.hivstatus", "");
            var eligibilityJson = _settings.GetValue("lookup.eligibility", "");


            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }

            if (null == IndexClient && !string.IsNullOrWhiteSpace(indexClientJson))
            {
                IndexClient = JsonConvert.DeserializeObject <IndexClientDTO>(indexClientJson);
            }

            if (EncounterTypeId.IsNullOrEmpty() && !string.IsNullOrWhiteSpace(encounterTypeId))
            {
                EncounterTypeId = new Guid(encounterTypeId);
            }

            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }

            if (HIVStatus.Count == 0 && !string.IsNullOrWhiteSpace(hivstatusJson))
            {
                HIVStatus = JsonConvert.DeserializeObject <List <CategoryItem> >(hivstatusJson);
            }

            if (Eligibility.Count == 0 && !string.IsNullOrWhiteSpace(eligibilityJson))
            {
                Eligibility = JsonConvert.DeserializeObject <List <CategoryItem> >(eligibilityJson);
            }


            if (null == Encounter && !string.IsNullOrWhiteSpace(clientEncounterJson))
            {
                Encounter = JsonConvert.DeserializeObject <Encounter>(clientEncounterJson);
            }
        }
        public override void ViewAppeared()
        {
            var clientJson          = _settings.GetValue("client.dto", "");
            var indexClientJson     = _settings.GetValue("pclientIndex", "");
            var clientEncounterJson = _settings.GetValue("client.encounter", "");
            var encounterTypeId     = _settings.GetValue("encounterTypeId", "");

            var pnsAcceptedJson  = _settings.GetValue("lookup.pnsAccepted", "");
            var ipvscreeningJson = _settings.GetValue("lookup.ipvscreening", "");

            var physicalAssultJson        = _settings.GetValue("lookup.physicalAssult", "");
            var threatenedJson            = _settings.GetValue("lookup.threatened", "");
            var sexuallyUncomfortableJson = _settings.GetValue("lookup.sexuallyUncomfortable", "");


            var ipvoutcomeJson       = _settings.GetValue("lookup.ipvoutcome", "");
            var pNsRealtionshipJson  = _settings.GetValue("lookup.pNSRealtionship", "");
            var livingWithClientJson = _settings.GetValue("lookup.livingWithClient", "");
            var pNsApproachJson      = _settings.GetValue("lookup.pNSApproach", "");

            var hivstatusJson   = _settings.GetValue("lookup.hivstatus", "");
            var eligibilityJson = _settings.GetValue("lookup.eligibility", "");

            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }

            if (EncounterTypeId.IsNullOrEmpty() && !string.IsNullOrWhiteSpace(encounterTypeId))
            {
                EncounterTypeId = new Guid(encounterTypeId);
            }

            if (null == Client && !string.IsNullOrWhiteSpace(clientJson))
            {
                Client = JsonConvert.DeserializeObject <Client>(clientJson);
            }
            if (null == IndexClient && !string.IsNullOrWhiteSpace(indexClientJson))
            {
                IndexClient = JsonConvert.DeserializeObject <IndexClientDTO>(indexClientJson);
            }

            if (PnsAccepted.Count == 0 && !string.IsNullOrWhiteSpace(pnsAcceptedJson))
            {
                PnsAccepted = JsonConvert.DeserializeObject <List <CategoryItem> >(pnsAcceptedJson);
            }

            if (IPVScreening.Count == 0 && !string.IsNullOrWhiteSpace(ipvscreeningJson))
            {
                IPVScreening = JsonConvert.DeserializeObject <List <CategoryItem> >(ipvscreeningJson);
            }

            if (PhysicalAssult.Count == 0 && !string.IsNullOrWhiteSpace(physicalAssultJson))
            {
                PhysicalAssult = JsonConvert.DeserializeObject <List <CategoryItem> >(physicalAssultJson);
            }

            if (Threatened.Count == 0 && !string.IsNullOrWhiteSpace(threatenedJson))
            {
                Threatened = JsonConvert.DeserializeObject <List <CategoryItem> >(threatenedJson);
            }
            if (SexuallyUncomfortable.Count == 0 && !string.IsNullOrWhiteSpace(sexuallyUncomfortableJson))
            {
                SexuallyUncomfortable = JsonConvert.DeserializeObject <List <CategoryItem> >(sexuallyUncomfortableJson);
            }

            if (IPVOutcome.Count == 0 && !string.IsNullOrWhiteSpace(ipvoutcomeJson))
            {
                IPVOutcome = JsonConvert.DeserializeObject <List <CategoryItem> >(ipvoutcomeJson);
            }
            if (PNSRealtionship.Count == 0 && !string.IsNullOrWhiteSpace(pNsRealtionshipJson))
            {
                PNSRealtionship = JsonConvert.DeserializeObject <List <CategoryItem> >(pNsRealtionshipJson);
            }
            if (LivingWithClient.Count == 0 && !string.IsNullOrWhiteSpace(livingWithClientJson))
            {
                LivingWithClient = JsonConvert.DeserializeObject <List <CategoryItem> >(livingWithClientJson);
            }
            if (PNSApproach.Count == 0 && !string.IsNullOrWhiteSpace(pNsApproachJson))
            {
                PNSApproach = JsonConvert.DeserializeObject <List <CategoryItem> >(pNsApproachJson);
            }


            if (HIVStatus.Count == 0 && !string.IsNullOrWhiteSpace(hivstatusJson))
            {
                HIVStatus = JsonConvert.DeserializeObject <List <CategoryItem> >(hivstatusJson);
            }

            if (Eligibility.Count == 0 && !string.IsNullOrWhiteSpace(eligibilityJson))
            {
                Eligibility = JsonConvert.DeserializeObject <List <CategoryItem> >(eligibilityJson);
            }

            if (null == Encounter && !string.IsNullOrWhiteSpace(clientEncounterJson))
            {
                Encounter = JsonConvert.DeserializeObject <Encounter>(clientEncounterJson);
            }

            try
            {
                SelectedPnsAccepted =
                    PnsAccepted.FirstOrDefault(x => x.ItemId == new Guid("B25ECCD4-852F-11E7-BB31-BE2E44B06B34"));
            }
            catch { }

            EnablePnsAccepted = false;
        }