Ejemplo n.º 1
0
        /// <summary>
        /// Creates the patient document.
        /// </summary>
        /// <param name="patient">The patient.</param>
        /// <param name="patientDocumentType">Type of the patient document.</param>
        /// <param name="document">The document.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <returns>
        /// A PatientDocument.
        /// </returns>
        public PatientDocument CreatePatientDocument(
            Patient patient,
            PatientDocumentType patientDocumentType,
            byte[] document,
            string fileName )
        {
            var hash = _hashingUtility.ComputeHash ( document );

            var patientDocument = new PatientDocument(patient, patientDocumentType, document, fileName, hash);

            _patientDocumentRepository.MakePersistent ( patientDocument );

            return patientDocument;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the patient document.
        /// </summary>
        /// <param name="patient">The patient.</param>
        /// <param name="patientDocumentType">Type of the patient document.</param>
        /// <param name="document">The document.</param>
        /// <param name="fileName">Name of the file.</param>
        /// <returns>
        /// A PatientDocument.
        /// </returns>
        public PatientDocument CreatePatientDocument(
            Patient patient,
            PatientDocumentType patientDocumentType,
            byte[] document,
            string fileName)
        {
            var hash = _hashingUtility.ComputeHash(document);

            var patientDocument = new PatientDocument(patient, patientDocumentType, document, fileName, hash);

            _patientDocumentRepository.MakePersistent(patientDocument);

            return(patientDocument);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Destroys the patient document.
 /// </summary>
 /// <param name="patientDocument">The patient document.</param>
 public void DestroyPatientDocument( PatientDocument patientDocument )
 {
     _patientDocumentRepository.MakeTransient ( patientDocument );
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Destroys the patient document.
 /// </summary>
 /// <param name="patientDocument">The patient document.</param>
 public void DestroyPatientDocument(PatientDocument patientDocument)
 {
     _patientDocumentRepository.MakeTransient(patientDocument);
 }