/// <summary>Writes an organization reports.</summary> /// <param name="orgId"> The organization.</param> /// <param name="dir"> The dir.</param> /// <param name="dateTime"> The period.</param> /// <param name="deviceData"> Information describing the device.</param> /// <param name="patientData">Information describing the patient.</param> /// <param name="testData"> Information describing the test.</param> /// <param name="workerData"> [out] Information describing the worker.</param> /// <param name="step"> Amount to increment by.</param> private static void WriteOrgReportBundle( string orgId, string dir, DateTime dateTime, OrgDeviceData deviceData, OrgPatientData patientData, OrgTestData testData, OrgWorkerData workerData, int step) { Dictionary <string, FieldValue> fields = OrgUtils.BuildFieldDict( deviceData, patientData, testData, workerData); ReportData data = new ReportData( dateTime, _orgById[orgId], _rootLocationByOrgId[orgId], fields); string filename = _outputFlat ? Path.Combine(dir, $"{orgId}-{_filenameAdditionForMeasureReports}-{step:0000}{_extension}") : Path.Combine(dir, $"{orgId}-{_filenameAdditionForMeasureReports}{_extension}"); WriteBundle( filename, SanerMeasureReport.GetBundle(data, null)); }
/// <summary>Writes a saner.</summary> /// <param name="outputDirectory">Directory to use for export files.</param> /// <param name="data"> The data.</param> private static void WriteSanerJson( string outputDirectory, ReportData data) { Hl7.Fhir.Model.Bundle bundle = SanerMeasureReport.GetBundle(data, true, true); string filename = Path.Combine(outputDirectory, $"{data.Reporter.Name}-saner.json"); File.WriteAllText( filename, _jsonSerializer.SerializeToString(bundle)); }