RxNormEntity.fromJson constructor
RxNormEntity.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RxNormEntity.fromJson(Map<String, dynamic> json) {
return RxNormEntity(
attributes: (json['Attributes'] as List?)
?.whereNotNull()
.map((e) => RxNormAttribute.fromJson(e as Map<String, dynamic>))
.toList(),
beginOffset: json['BeginOffset'] as int?,
category: (json['Category'] as String?)?.toRxNormEntityCategory(),
endOffset: json['EndOffset'] as int?,
id: json['Id'] as int?,
rxNormConcepts: (json['RxNormConcepts'] as List?)
?.whereNotNull()
.map((e) => RxNormConcept.fromJson(e as Map<String, dynamic>))
.toList(),
score: json['Score'] as double?,
text: json['Text'] as String?,
traits: (json['Traits'] as List?)
?.whereNotNull()
.map((e) => RxNormTrait.fromJson(e as Map<String, dynamic>))
.toList(),
type: (json['Type'] as String?)?.toRxNormEntityType(),
);
}