Example #1
0
        public ClientInfo GetClientInfo()
        {
            var c  = new ClientInfo();
            var cl = Clients.FirstOrDefault();

            if (null != cl)
            {
                c.Id               = cl.Id;
                c.MaritalStatus    = cl.MaritalStatus;
                c.KeyPop           = cl.KeyPop;
                c.OtherKeyPop      = cl.OtherKeyPop;
                c.IsFamilyMember   = cl.IsFamilyMember;
                c.IsPartner        = cl.IsPartner;
                c.PreventEnroll    = cl.PreventEnroll;
                c.AlreadyTestedPos = cl.AlreadyTestedPos;

                c.PracticeId = cl.PracticeId;
                c.Person     = GetPersonInfo();
                if (null != c.Person)
                {
                    c.PersonId = c.Person.Id;
                }
                c.Identifiers   = ClientIdentifier.GetIdentifierInfos(cl.Identifiers.ToList());
                c.Relationships = ClientRelationship.GetClientRelationshipInfos(cl.Relationships.ToList());
                c.ClientStates  = ClientState.GetClientStateInfos(cl.ClientStates.ToList());
            }

            return(c);
        }