/// <summary> /// Prepare HATEOAS links for a single resource /// </summary> /// <param name="dto">The dto that the link has been added to</param> /// <returns></returns> private DatasetElementIdentifierDto CreateLinksForDatasetElement <T>(T dto) { DatasetElementIdentifierDto identifier = (DatasetElementIdentifierDto)(object)dto; identifier.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("DatasetElement", identifier.Id), "self", "GET")); return(identifier); }
/// <summary> /// Prepare HATEOAS links for a single resource /// </summary> /// <param name="dto">The dto that the link has been added to</param> /// <returns></returns> private HolidayIdentifierDto CreateLinksForHoliday <T>(T dto) { HolidayIdentifierDto identifier = (HolidayIdentifierDto)(object)dto; identifier.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Holiday", identifier.Id), "self", "GET")); return(identifier); }
/// <summary> /// Prepare HATEOAS links for a single resource /// </summary> /// <param name="dto">The dto that the link has been added to</param> /// <returns></returns> private OutcomeIdentifierDto CreateLinksForOutcome <T>(T dto) { OutcomeIdentifierDto identifier = (OutcomeIdentifierDto)(object)dto; identifier.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Outcome", identifier.Id), "self", "GET")); return(identifier); }
/// <summary> /// Prepare HATEOAS links for a single resource /// </summary> /// <param name="dto">The dto that the link has been added to</param> /// <returns></returns> private CustomAttributeIdentifierDto CreateLinksForCustomAttribute <T>(T dto) { CustomAttributeIdentifierDto identifier = (CustomAttributeIdentifierDto)(object)dto; identifier.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CustomAttribute", identifier.Id), "self", "GET")); return(identifier); }
/// <summary> /// Prepare HATEOAS links for a single resource /// </summary> /// <param name="dto">The dto that the link has been added to</param> /// <returns></returns> private RiskFactorIdentifierDto CreateLinksForRiskFactor <T>(T dto) { RiskFactorIdentifierDto identifier = (RiskFactorIdentifierDto)(object)dto; identifier.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("RiskFactor", identifier.Id), "self", "GET")); return(identifier); }
private async Task CreateLinksAsync(ReportInstance reportInstanceFromRepo, ReportInstanceDetailDto mappedReportInstance) { if (reportInstanceFromRepo == null) { throw new ArgumentNullException(nameof(reportInstanceFromRepo)); } mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateReportInstanceResourceUri(reportInstanceFromRepo.WorkFlow.WorkFlowGuid, mappedReportInstance.Id), "self", "GET")); switch (reportInstanceFromRepo.CurrentActivity.QualifiedName) { case "Confirm Report Data": CreateLinksForConfirmationStep(reportInstanceFromRepo, mappedReportInstance); break; case "Set MedDRA and Causality": await CreateLinksForTerminologyStepAsync(reportInstanceFromRepo, mappedReportInstance); break; case "Extract E2B": await CreateLinksForE2BStepAsync(reportInstanceFromRepo, mappedReportInstance); break; default: break; } var validRoles = new string[] { "RegClerk", "DataCap", "Clinician" }; if (reportInstanceFromRepo.WorkFlow.Description == "New Active Surveilliance Report") { mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Patient", reportInstanceFromRepo.Id), "viewpatient", "GET")); } if (reportInstanceFromRepo.WorkFlow.Description == "New Spontaneous Surveilliance Report") { var datasetInstance = _datasetInstanceRepository.Get(di => di.DatasetInstanceGuid == reportInstanceFromRepo.ContextGuid); if (datasetInstance != null) { mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateUpdateDatasetInstanceResourceUri( datasetInstance.Dataset.Id, datasetInstance.Id), "updatespont", "PUT")); } } }
private AttachmentIdentifierDto CreateLinks(AttachmentIdentifierDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Attachment", dto.Id), "self", "GET")); return(dto); }
private void CreateLinksForCohortGroup(CohortGroupPatientDetailDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CohortGroup", dto.Id), "self", "GET")); }
private void CreateLinks(ConditionIdentifierDto mappedCondition) { mappedCondition.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Condition", mappedCondition.Id), "self", "GET")); }
private void CreateLinks(PatientIdentifierDto mappedPatient) { mappedPatient.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Patient", mappedPatient.Id), "self", "GET")); mappedPatient.Links.Add(new LinkDto(_linkGeneratorService.CreateNewAppointmentForPatientResourceUri(mappedPatient.Id), "newAppointment", "POST")); mappedPatient.Links.Add(new LinkDto(_linkGeneratorService.CreateNewEnrolmentForPatientResourceUri(mappedPatient.Id), "newEnrolment", "POST")); }
private FacilityDetailDto CreateLinks(FacilityDetailDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Facility", dto.Id), "self", "GET")); return(dto); }
private void CreateLinks(CohortGroupDetailDto mappedCohortGroup) { mappedCohortGroup.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CohortGroup", mappedCohortGroup.Id), "self", "GET")); }
private CohortGroupDetailDto CreateLinks(CohortGroupDetailDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CohortGroup", dto.Id), "self", "GET")); return(dto); }
private void CreateLinks(ProductDetailDto mappedProduct) { mappedProduct.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Product", mappedProduct.Id), "self", "GET")); }
private PatientClinicalEventExpandedDto CreateLinks(PatientClinicalEventExpandedDto mappedPatientClinicalEvent) { mappedPatientClinicalEvent.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("PatientClinicalEvent", mappedPatientClinicalEvent.Id), "self", "GET")); return(mappedPatientClinicalEvent); }
private void CreateLinks(UserDetailDto mappedUser) { mappedUser.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("User", mappedUser.Id), "self", "GET")); mappedUser.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("User", mappedUser.Id), "self", "DELETE")); }
private PatientClinicalEventIdentifierDto CreateLinks(PatientClinicalEventIdentifierDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("PatientClinicalEvent", dto.Id), "self", "GET")); return(dto); }
private void CreateLinks(CustomAttributeIdentifierDto mappedCustomAttribute) { mappedCustomAttribute.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CustomAttribute", mappedCustomAttribute.Id), "self", "GET")); mappedCustomAttribute.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CustomAttribute", mappedCustomAttribute.Id), "self", "DELETE")); }
private void CreateLinks(ConceptDetailDto mappedConcept) { mappedConcept.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Concept", mappedConcept.Id), "self", "GET")); }
private PatientMedicationIdentifierDto CreateLinks(PatientMedicationIdentifierDto mappedPatientMedication) { mappedPatientMedication.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("PatientMedication", mappedPatientMedication.Id), "self", "GET")); return(mappedPatientMedication); }
private CohortGroupIdentifierDto CreateLinks(CohortGroupIdentifierDto mappedCohortGroup) { mappedCohortGroup.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CohortGroup", mappedCohortGroup.Id), "self", "GET")); return(mappedCohortGroup); }
private void CreateLinks(PatientLabTestDetailDto mappedPatientLabTest) { mappedPatientLabTest.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("PatientLabTest", mappedPatientLabTest.Id), "self", "GET")); }
private void CreateLinks(UserIdentifierDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("User", dto.Id), "self", "GET")); }
private void CreateLinks(CustomAttributeDetailDto mappedFacility) { mappedFacility.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Facility", mappedFacility.Id), "self", "GET")); mappedFacility.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Facility", mappedFacility.Id), "self", "DELETE")); }
private TaskCommentDto CreateLinks(TaskCommentDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("ReportInstanceTaskComment", dto.Id), "self", "GET")); return(dto); }
private WorkFlowDetailDto CreateLinks(WorkFlowDetailDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("WorkFlow", dto.Id), "self", "GET")); return(dto); }
private void CreateLinks(MedicationFormIdentifierDto mappedConcept) { mappedConcept.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("MedicationForm", mappedConcept.Id), "self", "GET")); }
private void CreateLinks(CustomAttributeIdentifierDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("CustomAttribute", dto.Id), "self", "GET")); }
private ProductIdentifierDto CreateLinks(ProductIdentifierDto mappedProduct) { mappedProduct.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Product", mappedProduct.Id), "self", "GET")); return(mappedProduct); }
private void CreateLinks(AppointmentIdentifierDto dto) { dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Appointment", dto.Id), "self", "GET")); dto.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUri("Appointment", dto.Id), "self", "DELETE")); }