app/models/cqm/provider.rb in cqm-models-2.0.1 vs app/models/cqm/provider.rb in cqm-models-3.0.0
- old
+ new
@@ -14,29 +14,29 @@
validates_uniqueness_of :npi, allow_blank: true
embeds_many :addresses
embeds_many :telecoms
- embeds_many :ids, class_name: 'QDM::Id'
+ embeds_many :ids, class_name: 'QDM::Identifier'
def npi=(an_npi)
cda_id_npi = ids.where(namingSystem: NPI_OID).first
if cda_id_npi
cda_id_npi.value = an_npi
cda_id_npi.save!
else
- ids << QDM::Id.new(namingSystem: NPI_OID, value: an_npi)
+ ids << QDM::Identifier.new(namingSystem: NPI_OID, value: an_npi)
end
end
def npi
cda_id_npi = ids.where(namingSystem: NPI_OID).first
cda_id_npi ? cda_id_npi.value : nil
end
def tin=(a_tin)
- ids << QDM::Id.new(namingSystem: TAX_ID_OID, value: a_tin)
+ ids << QDM::Identifier.new(namingSystem: TAX_ID_OID, value: a_tin)
end
def tin
cda_id_tin = ids.where(namingSystem: TAX_ID_OID).first
cda_id_tin ? cda_id_tin.value : nil
@@ -46,10 +46,10 @@
cda_id_ccn = ids.where(namingSystem: CCN_OID).first
if cda_id_ccn
cda_id_ccn.value = a_ccn
cda_id_ccn.save!
else
- ids << QDM::Id.new(namingSystem: CCN_OID, value: a_ccn)
+ ids << QDM::Identifier.new(namingSystem: CCN_OID, value: a_ccn)
end
end
def ccn
cda_id_ccn = ids.where(namingSystem: CCN_OID).first