locked
Gender RRS feed

  • Question

  • I thought that Gender is a CodableValue?

    How do I get and set it?

    Thanks,
    Gary
    Friday, August 7, 2009 8:48 PM

Answers

  • Hi Gary

    You can get the gender using

      Basic basic = GetSingleValue<Basic>(Basic.TypeId);
            if (basic != null && basic.Gender.HasValue)
            {
                string Gender = basic.Gender.ToString();
            }

    and you can set it like
            basic.Gender = Microsoft.Health.ItemTypes.Gender.Male;


    -Mahesh
    • Marked as answer by Gary Isaac Friday, August 7, 2009 9:15 PM
    Friday, August 7, 2009 9:08 PM

All replies

  • Hi Gary

    You can get the gender using

      Basic basic = GetSingleValue<Basic>(Basic.TypeId);
            if (basic != null && basic.Gender.HasValue)
            {
                string Gender = basic.Gender.ToString();
            }

    and you can set it like
            basic.Gender = Microsoft.Health.ItemTypes.Gender.Male;


    -Mahesh
    • Marked as answer by Gary Isaac Friday, August 7, 2009 9:15 PM
    Friday, August 7, 2009 9:08 PM
  • Thanks Mahesh.
    Friday, August 7, 2009 9:16 PM