locked
Street issue when Creating an Encouter with an Address RRS feed

  • Question

  • I'm trying to create a medical encounter (using class Encounter). I create an Address class (

    Address address = new Address("Somerset", "US", "08873")Wink and tried assigning it to Encounter.Location = address, but I get an error message that Street is required ( "The street must contain at least one value before creating or updating the item.")

     

    However, when I check Address.Street's property, it's listed as read-only. How can I then set the street value?

     

    Tuesday, May 13, 2008 3:02 PM

Answers

  • Street is a collection so that it can support more than one line.

     

    You therefore do something like:

     

    Address address = new Address("Somerset", "US", "08873");

    address.Street.Add("101 Elm");

    Tuesday, May 13, 2008 3:28 PM

All replies

  • Street is a collection so that it can support more than one line.

     

    You therefore do something like:

     

    Address address = new Address("Somerset", "US", "08873");

    address.Street.Add("101 Elm");

    Tuesday, May 13, 2008 3:28 PM
  • Eric,

    Thanks for the tip!

    On a different topic, when I export from my HV account an Encounter record that includes address information, the columns  in  the  CSV are off since  address  itself contains commas. .. maybe the export format in the future release of HV should be something other than CSV.

    Phillip
    Thursday, May 15, 2008 2:46 PM
  • Phillip,

     

    Can you enter that bug at the healthvault connect site? https://connect.microsoft.com/site/sitehome.aspx?SiteID=608

     

    Thanks.

    Thursday, May 15, 2008 3:51 PM
  • done!

     

    Friday, May 16, 2008 11:10 PM