public void ResumeEncounter(EncounterTemplate encounterTemplate)
        {
            var clientEncounterDTO     = ClientEncounterDTO.Create(Client.Id, encounterTemplate);
            var clientEncounterDTOJson = JsonConvert.SerializeObject(clientEncounterDTO);

            _settings.AddOrUpdateValue("client.encounter.dto", clientEncounterDTOJson);

            ShowViewModel <ClientEncounterViewModel>(new
            {
                formId      = encounterTemplate.FormId.ToString(),
                mode        = "open",
                encounterId = encounterTemplate.Id.ToString()
            });
        }
        public void StartEncounter(FormTemplate formTemplate)
        {
            var clientEncounterDTO     = ClientEncounterDTO.Create(Client.Id, formTemplate);
            var clientEncounterDTOJson = JsonConvert.SerializeObject(clientEncounterDTO);

            _settings.AddOrUpdateValue("client.encounter.dto", clientEncounterDTOJson);

            ShowViewModel <ClientEncounterViewModel>(new
            {
                formId      = formTemplate.Id.ToString(),
                mode        = "new",
                encounterId = ""
            });
        }
Beispiel #3
0
        public void ResumeEncounter(EncounterTemplate encounterTemplate)
        {
            if (!CheckEligibility())
            {
                return;
            }

            var clientEncounterDTO     = ClientEncounterDTO.Create(Client.Id, encounterTemplate);
            var clientEncounterDTOJson = JsonConvert.SerializeObject(clientEncounterDTO);

            _settings.AddOrUpdateValue("client.encounter.dto", clientEncounterDTOJson);



            if (encounterTemplate.FormDisplay.ToLower().Contains("Test Form".ToLower()))
            {
                ShowViewModel <TestingViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString()
                });
                return;
            }
            //Linkage
            if (encounterTemplate.FormDisplay.ToLower().Contains("Linkage".ToLower()))
            {
                ShowViewModel <LinkageViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString()
                });
                return;
            }

            //Member Screening
            if (encounterTemplate.FormDisplay.ToLower().Contains("Member Screening".ToLower()))
            {
                ShowViewModel <MemberScreeningViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString(),
                    indexclient     = null != IndexClient ? IndexClient.Id.ToString() : ""
                });
                return;
            }

            //Member Tracing
            if (encounterTemplate.FormDisplay.ToLower().Contains("Member Tracing".ToLower()))
            {
                ShowViewModel <MemberTracingViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString(),
                    indexclient     = null != IndexClient ? IndexClient.Id.ToString() : ""
                });
                return;
            }


            //Partner Screening
            if (encounterTemplate.FormDisplay.ToLower().Contains("Partner Screening".ToLower()))
            {
                ShowViewModel <PartnerScreeningViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString(),
                    indexclient     = null != IndexClient ? IndexClient.Id.ToString() : ""
                });
                return;
            }

            //Partner Screening
            if (encounterTemplate.FormDisplay.ToLower().Contains("Partner Tracing".ToLower()))
            {
                ShowViewModel <PartnerTracingViewModel>(new
                {
                    formId          = encounterTemplate.FormId.ToString(),
                    encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                    mode            = "open",
                    clientId        = Client.Id.ToString(),
                    encounterId     = encounterTemplate.Id.ToString(),
                    indexclient     = null != IndexClient ? IndexClient.Id.ToString() : ""
                });
                return;
            }
            ShowViewModel <ClientEncounterViewModel>(new
            {
                formId          = encounterTemplate.FormId.ToString(),
                encounterTypeId = encounterTemplate.EncounterTypeId.ToString(),
                mode            = "open",
                encounterId     = encounterTemplate.Id.ToString()
            });
        }
Beispiel #4
0
        public void StartEncounter(FormTemplate formTemplate)
        {
            if (!CheckEligibility())
            {
                return;
            }

            var clientEncounterDTO     = ClientEncounterDTO.Create(Client.Id, formTemplate);
            var clientEncounterDTOJson = JsonConvert.SerializeObject(clientEncounterDTO);

            _settings.AddOrUpdateValue("client.encounter.dto", clientEncounterDTOJson);

            //Testing
            if (formTemplate.Display.ToLower().Contains("Test Form".ToLower()))
            {
                ShowViewModel <TestingViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = ""
                });
                return;
            }

            //Linkage
            if (formTemplate.Display.ToLower().Contains("Linkage".ToLower()))
            {
                ShowViewModel <LinkageViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = ""
                });
                return;
            }

            //Member Screening
            if (formTemplate.Display.ToLower().Contains("Member Screening".ToLower()))
            {
                ShowViewModel <MemberScreeningViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = "",
                    indexclient     = IndexClient.Id.ToString()
                });
                return;
            }

            //Member Tracing
            if (formTemplate.Display.ToLower().Contains("Member Tracing".ToLower()))
            {
                ShowViewModel <MemberTracingViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = "",
                    indexclient     = IndexClient.Id.ToString()
                });
                return;
            }

            //  Partner Screening
            if (formTemplate.Display.ToLower().Contains("Partner Screening".ToLower()))
            {
                ShowViewModel <PartnerScreeningViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = "",
                    indexclient     = IndexClient.Id.ToString()
                });
                return;
            }

            //  Partner Tracing
            if (formTemplate.Display.ToLower().Contains("Partner Tracing".ToLower()))
            {
                ShowViewModel <PartnerTracingViewModel>(new
                {
                    formId          = formTemplate.Id.ToString(),
                    encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                    mode            = "new",
                    clientId        = Client.Id.ToString(),
                    encounterId     = "",
                    indexclient     = IndexClient.Id.ToString()
                });
                return;
            }

            //  Pretest
            ShowViewModel <ClientEncounterViewModel>(new
            {
                formId          = formTemplate.Id.ToString(),
                encounterTypeId = formTemplate.EncounterTypeId.ToString(),
                mode            = "new",
                encounterId     = "",
                repmode         = formTemplate.RepMode
            });
        }