잠김 Address Data Type - Mandatory fields

  • Friday, July 31, 2009 11:30 AM
     
     

    I am using Person Data type to hold the contacts/providers of the user. As we had city, country & Zip as mandatory fields, I was giving " " (string with one empty space) in it and it was working fine in the previous version of HV SDK. Now from new SDK in June 09, it is not allowing to add " " (string with space character) to the fields of address data type. Previously, it was allowing that. So now my below code fails. Any workaround for this? Also, from https://account.healthvault-ppe.com web portal, I am not able to view the previously added Contacts, which as " " character in thier streer, city and country.

     

    // Address of Contact

     

    Address cAddress = new Address();

    cAddress.Description = addressTypeContact;

    cAddress.IsPrimary =

    true;

    cAddress.Street.Add(contact.Address);

     

    // City.

     

    if (!string.IsNullOrEmpty(contact.City))

    { cAddress.City = contact.City; }

     

    else { cAddress.City = stringWithSpace; }

     

    // Country/

     

    if (!string.IsNullOrEmpty(contact.Country))

    { cAddress.Country = contact.Country; }

     

    else { cAddress.Country = stringWithSpace; }

     

    // State

     

    if (!string.IsNullOrEmpty(contact.State))

    { cAddress.State = contact.State; }

     

    else { cAddress.State = stringWithSpace; }

     

    // Postal code

     

    if (!string.IsNullOrEmpty(contact.Zipcode))

    { cAddress.PostalCode = contact.Zipcode; }

     

    else { cAddress.PostalCode = stringWithSpace; }


All Replies

  • Wednesday, August 12, 2009 4:17 PM
     
     
    Lalit,

    A similar issue reported over here , can you follow that too for a work around on this.



    Thanks,
    Anish Ravindran
  • Monday, August 24, 2009 6:46 PM
     
     

    Lalit,

    Putting a " " (space) string as those values is definitely an inappropriate use of those fields. It may have seen allowed before, but should not have been.

    Possible work around -

    1. We should not suggest putting 'junk' data into those fields, can't you prefer N/A.
    2. If the restriction to make the full address required is at the .NET SDK level, and not the XML API level, then the partner could either modify the SDK code or call the XML API directly, and supply only those fields which are accurate and present (like address without ZIP code).  If that allows the omission of ZIP code, then that’s fine.

    Hope this helps.

    Thank you,
    ANish Ravindran