/// <summary> /// Creates the service. /// </summary> /// <param name="encounter">The encounter.</param> /// <param name="diagnosis">The diagnosis.</param> /// <param name="medicalProcedure">The medical procedure.</param> /// <param name="primaryIndicator">If set to <c>true</c> [primary indicator].</param> /// <param name="trackingNumber">The tracking number.</param> /// <returns>A service.</returns> public Service CreateService(Encounter encounter, CodedConcept diagnosis, MedicalProcedure medicalProcedure, bool primaryIndicator, long trackingNumber) { var service = new Service(encounter, diagnosis, medicalProcedure, primaryIndicator, trackingNumber); encounter.AddService(service); _serviceRepository.MakePersistent(service); return(service); }
/// <summary> /// Initializes a new instance of the <see cref="Service"/> class. /// </summary> /// <param name="encounter">The encounter.</param> /// <param name="diagnosis">The diagnosis.</param> /// <param name="medicalProcedure">The medical procedure.</param> /// <param name="primaryIndicator">If set to <c>true</c> [primary indicator].</param> /// <param name="trackingNumber">The tracking number.</param> protected internal Service(Encounter encounter, CodedConcept diagnosis, MedicalProcedure medicalProcedure, bool primaryIndicator, long trackingNumber) { Check.IsNotNull(encounter, "Encounter is required."); Check.IsNotNull(diagnosis, "Diagnosis is required."); Check.IsNotNull(medicalProcedure, "Medical procedure is required."); PrimaryIndicator = primaryIndicator; Encounter = encounter; Diagnosis = diagnosis; MedicalProcedure = medicalProcedure; TrackingNumber = trackingNumber; }
/// <summary> /// Revises the medical procedure. /// </summary> /// <param name="medicalProcedure">The medical procedure.</param> public virtual void ReviseMedicalProcedure(MedicalProcedure medicalProcedure) { Check.IsNotNull(medicalProcedure, "Medical procedure is required."); MedicalProcedure = medicalProcedure; }