Skip to content

Commit 9e2ceec

Browse files
committed
checkin
1 parent 973e685 commit 9e2ceec

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

DotNet/DataAcquisition.Domain/Application/Models/Api/Configuration/FhirQueryModel.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,22 @@ public class FhirQueryModel
1919
public TimeFrame? CensusTimeFrame { get; set; } = null;
2020
public ListType? CensusPatientStatus { get; set; } = null;
2121
public string? CensusListId { get; set; } = null;
22+
23+
public string Query
24+
{
25+
get
26+
{
27+
if (ResourceTypes.Count == 0)
28+
return string.Empty;
29+
30+
return QueryType switch
31+
{
32+
FhirQueryType.Search => $"{ResourceTypes[0]}?{string.Join("&", QueryParameters)}",
33+
FhirQueryType.Read => $"{ResourceTypes[0]}/{string.Join("&", QueryParameters)}",
34+
FhirQueryType.BulkDataRequest => "BulkDataRequest", // add logic when bulk fhir is implemented
35+
FhirQueryType.BulkDataPoll => string.Join("&", QueryParameters),
36+
_ => string.Empty
37+
};
38+
}
39+
}
2240
}

0 commit comments

Comments
 (0)