encode static method

Map<String, dynamic> encode(
  1. Medication value
)

Implementation

static Map<String, dynamic> encode(Medication value) {
	Map<String, dynamic> entityAsMap = {
		"compoundPrescription" : value.compoundPrescription,
		"substanceProduct" : value.substanceProduct == null ? null : Substanceproduct.encode(value.substanceProduct!),
		"medicinalProduct" : value.medicinalProduct == null ? null : Medicinalproduct.encode(value.medicinalProduct!),
		"numberOfPackages" : value.numberOfPackages,
		"batch" : value.batch,
		"expirationDate" : value.expirationDate,
		"instructionForPatient" : value.instructionForPatient,
		"instructionForReimbursement" : value.instructionForReimbursement,
		"commentForDelivery" : value.commentForDelivery,
		"drugRoute" : value.drugRoute,
		"temporality" : value.temporality,
		"frequency" : value.frequency == null ? null : CodeStub.encode(value.frequency!),
		"reimbursementReason" : value.reimbursementReason == null ? null : CodeStub.encode(value.reimbursementReason!),
		"substitutionAllowed" : value.substitutionAllowed,
		"beginMoment" : value.beginMoment,
		"endMoment" : value.endMoment,
		"deliveryMoment" : value.deliveryMoment,
		"endExecutionMoment" : value.endExecutionMoment,
		"duration" : value.duration == null ? null : Duration.encode(value.duration!),
		"renewal" : value.renewal == null ? null : Renewal.encode(value.renewal!),
		"knownUsage" : value.knownUsage,
		"regimen" : value.regimen?.map((x0) => RegimenItem.encode(x0)).toList(),
		"posology" : value.posology,
		"agreements" : value.agreements?.map((k0, v0) => MapEntry(k0, ParagraphAgreement.encode(v0))),
		"medicationSchemeIdOnSafe" : value.medicationSchemeIdOnSafe,
		"medicationSchemeSafeVersion" : value.medicationSchemeSafeVersion,
		"medicationSchemeTimeStampOnSafe" : value.medicationSchemeTimeStampOnSafe,
		"medicationSchemeDocumentId" : value.medicationSchemeDocumentId,
		"safeIdName" : value.safeIdName,
		"idOnSafes" : value.idOnSafes,
		"timestampOnSafe" : value.timestampOnSafe,
		"changeValidated" : value.changeValidated,
		"newSafeMedication" : value.newSafeMedication,
		"medicationUse" : value.medicationUse,
		"beginCondition" : value.beginCondition,
		"endCondition" : value.endCondition,
		"origin" : value.origin,
		"medicationChanged" : value.medicationChanged,
		"posologyChanged" : value.posologyChanged,
		"suspension" : value.suspension?.map((x0) => Suspension.encode(x0)).toList(),
		"prescriptionRID" : value.prescriptionRID,
		"status" : value.status
	};
	return entityAsMap;
}