public KmehrHealthCarePartyBuilder AddAddress(KmehrAddressTypes addressType, string country, string zipCode = null, string city = null, string street = null, string houseNumber = null, string postboxNumber = null)
        {
            var newAddressType = new addressType
            {
                cd = new CDADDRESS[1]
                {
                    new CDADDRESS
                    {
                        S     = CDADDRESSschemes.CDADDRESS,
                        SV    = KmehrConstant.ReferenceVersion.CD_ADDRESS_VERSION,
                        Value = addressType.Code
                    }
                },
                country = new countryType
                {
                    cd = new CDCOUNTRY
                    {
                        S     = CDCOUNTRYschemes.CDFEDCOUNTRY,
                        SV    = KmehrConstant.ReferenceVersion.CD_FEDICT_COUNTRY_CODE_VERSION,
                        Value = country
                    }
                },
                zip           = zipCode,
                city          = city,
                street        = street,
                housenumber   = houseNumber,
                postboxnumber = postboxNumber
            };

            if (_hcParty.address == null)
            {
                _hcParty.address = new addressType[0];
            }

            var addresses = _hcParty.address.ToList();

            addresses.Add(newAddressType);
            _hcParty.address = addresses.ToArray();
            return(this);
        }
Esempio n. 2
0
 public KmehrAddress(KmehrAddressTypes type)
 {
     Cd = new KmehrId(Constants.KmehrSenderQualifications.CDADDRESS, "1.1", _mapping[type]);
 }