EncryptedPatient.fromJSON constructor

EncryptedPatient.fromJSON(
  1. Map<String, dynamic> data
)

Implementation

factory EncryptedPatient.fromJSON(Map<String, dynamic> data) {
	return EncryptedPatient(
		(data["id"] as String),
		deactivationDate: (data["deactivationDate"] as int?),
		dateOfBirth: (data["dateOfBirth"] as int?),
		dateOfDeath: (data["dateOfDeath"] as int?),
		identifier: (data["identifier"] as List<dynamic>).map((x0) => Identifier.fromJSON(x0) ).toList(),
		rev: (data["rev"] as String?),
		created: (data["created"] as int?),
		modified: (data["modified"] as int?),
		author: (data["author"] as String?),
		responsible: (data["responsible"] as String?),
		tags: (data["tags"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
		codes: (data["codes"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toSet(),
		endOfLife: (data["endOfLife"] as int?),
		deletionDate: (data["deletionDate"] as int?),
		firstName: (data["firstName"] as String?),
		lastName: (data["lastName"] as String?),
		names: (data["names"] as List<dynamic>).map((x0) => PersonName.fromJSON(x0) ).toList(),
		companyName: (data["companyName"] as String?),
		languages: (data["languages"] as List<dynamic>).map((x0) => (x0 as String) ).toList(),
		addresses: (data["addresses"] as List<dynamic>).map((x0) => EncryptedAddress.fromJSON(x0) ).toList(),
		civility: (data["civility"] as String?),
		gender: data["gender"] == null ? null : Gender.fromJSON(data["gender"]),
		birthSex: data["birthSex"] == null ? null : Gender.fromJSON(data["birthSex"]),
		mergeToPatientId: (data["mergeToPatientId"] as String?),
		mergedIds: (data["mergedIds"] as List<dynamic>).map((x0) => (x0 as String) ).toSet(),
		alias: (data["alias"] as String?),
		active: (data["active"] as bool),
		deactivationReason: DeactivationReason.fromJSON(data["deactivationReason"]),
		ssin: (data["ssin"] as String?),
		maidenName: (data["maidenName"] as String?),
		spouseName: (data["spouseName"] as String?),
		partnerName: (data["partnerName"] as String?),
		personalStatus: data["personalStatus"] == null ? null : PersonalStatus.fromJSON(data["personalStatus"]),
		timestampOfLatestEidReading: (data["timestampOfLatestEidReading"] as int?),
		placeOfBirth: (data["placeOfBirth"] as String?),
		placeOfDeath: (data["placeOfDeath"] as String?),
		deceased: (data["deceased"] as bool?),
		education: (data["education"] as String?),
		profession: (data["profession"] as String?),
		notes: (data["notes"] as List<dynamic>).map((x0) => Annotation.fromJSON(x0) ).toList(),
		note: (data["note"] as String?),
		administrativeNote: (data["administrativeNote"] as String?),
		nationality: (data["nationality"] as String?),
		race: (data["race"] as String?),
		ethnicity: (data["ethnicity"] as String?),
		preferredUserId: (data["preferredUserId"] as String?),
		picture: data["picture"] == null ? null : base64Decode(data["picture"] as String),
		externalId: (data["externalId"] as String?),
		insurabilities: (data["insurabilities"] as List<dynamic>).map((x0) => EncryptedInsurability.fromJSON(x0) ).toList(),
		partnerships: (data["partnerships"] as List<dynamic>).map((x0) => Partnership.fromJSON(x0) ).toList(),
		patientHealthCareParties: (data["patientHealthCareParties"] as List<dynamic>).map((x0) => EncryptedPatientHealthCareParty.fromJSON(x0) ).toList(),
		financialInstitutionInformation: (data["financialInstitutionInformation"] as List<dynamic>).map((x0) => EncryptedFinancialInstitutionInformation.fromJSON(x0) ).toList(),
		medicalHouseContracts: (data["medicalHouseContracts"] as List<dynamic>).map((x0) => EncryptedMedicalHouseContract.fromJSON(x0) ).toList(),
		patientProfessions: (data["patientProfessions"] as List<dynamic>).map((x0) => CodeStub.fromJSON(x0) ).toList(),
		parameters: (data["parameters"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => (x1 as String) ).toList())),
		properties: (data["properties"] as List<dynamic>).map((x0) => EncryptedPropertyStub.fromJSON(x0) ).toSet(),
		hcPartyKeys: (data["hcPartyKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => (x1 as HexString) ).toList())),
		aesExchangeKeys: (data["aesExchangeKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as SpkiHexString), (v0 as Map<String, dynamic>).map((k1, v1) => MapEntry((k1 as String), (v1 as Map<String, dynamic>).map((k2, v2) => MapEntry((k2 as AesExchangeKeyEncryptionKeypairIdentifier), (v2 as HexString))))))),
		transferKeys: (data["transferKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as AesExchangeKeyEncryptionKeypairIdentifier), (v0 as Map<String, dynamic>).map((k1, v1) => MapEntry((k1 as AesExchangeKeyEncryptionKeypairIdentifier), (v1 as HexString))))),
		privateKeyShamirPartitions: (data["privateKeyShamirPartitions"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as HexString))),
		publicKey: (data["publicKey"] as SpkiHexString?),
		publicKeysForOaepWithSha256: (data["publicKeysForOaepWithSha256"] as List<dynamic>).map((x0) => (x0 as SpkiHexString) ).toSet(),
		secretForeignKeys: (data["secretForeignKeys"] as List<dynamic>).map((x0) => (x0 as String) ).toSet(),
		cryptedForeignKeys: (data["cryptedForeignKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => Delegation.fromJSON(x1) ).toSet())),
		delegations: (data["delegations"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => Delegation.fromJSON(x1) ).toSet())),
		encryptionKeys: (data["encryptionKeys"] as Map<String, dynamic>).map((k0, v0) => MapEntry((k0 as String), (v0 as List<dynamic>).map((x1) => Delegation.fromJSON(x1) ).toSet())),
		encryptedSelf: (data["encryptedSelf"] as Base64String?),
		securityMetadata: data["securityMetadata"] == null ? null : SecurityMetadata.fromJSON(data["securityMetadata"]),
		medicalLocationId: (data["medicalLocationId"] as String?),
		nonDuplicateIds: (data["nonDuplicateIds"] as List<dynamic>).map((x0) => (x0 as String) ).toSet(),
		encryptedAdministrativesDocuments: (data["encryptedAdministrativesDocuments"] as List<dynamic>).map((x0) => (x0 as String) ).toSet(),
		comment: (data["comment"] as String?),
		warning: (data["warning"] as String?),
		fatherBirthCountry: data["fatherBirthCountry"] == null ? null : CodeStub.fromJSON(data["fatherBirthCountry"]),
		birthCountry: data["birthCountry"] == null ? null : CodeStub.fromJSON(data["birthCountry"]),
		nativeCountry: data["nativeCountry"] == null ? null : CodeStub.fromJSON(data["nativeCountry"]),
		socialStatus: data["socialStatus"] == null ? null : CodeStub.fromJSON(data["socialStatus"]),
		mainSourceOfIncome: data["mainSourceOfIncome"] == null ? null : CodeStub.fromJSON(data["mainSourceOfIncome"]),
		schoolingInfos: (data["schoolingInfos"] as List<dynamic>).map((x0) => SchoolingInfo.fromJSON(x0) ).toList(),
		employementInfos: (data["employementInfos"] as List<dynamic>).map((x0) => EmploymentInfo.fromJSON(x0) ).toList(),
	);
}