-
Notifications
You must be signed in to change notification settings - Fork 1
/
InteractionsStrategy.cls
69 lines (61 loc) · 2 KB
/
InteractionsStrategy.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Class sdf.fhirserver.InteractionsStrategy Extends HS.FHIRServer.Storage.Json.InteractionsStrategy
{
Parameter StrategyKey As STRING = "sdf.fhirserver.Json";
Parameter InteractionsClass As STRING = "sdf.fhirserver.Interactions";
/// @API<br>
/// Return a CapabilityStatement metadata resource. The returned content is derived from
/// a strategy-specific means of formulating a CapabilityStatement. An example use of the
/// output might be to store the CapabilityStatement for a given Service.<br>
/// This method should not be confused with the Interactions class LoadMetadata() method,
/// which retrieves the stored CapabilityStatement for the current Service.
///
/// IMPORTANT! after changing this method you should call:
/// do ##class(HS.FHIRServer.ConsoleSetup).UpdateCapabilityStatement()
///
Method GetMetadataResource() As %DynamicObject
{
// default capability statement
set metadata = ##super()
set ObservationRes = {
"type": "Observation",
"versioning": "no-version",
"readHistory": false,
"updateCreate": false,
"conditionalCreate": false,
"conditionalRead": "not-supported",
"conditionalUpdate": false,
"conditionalDelete": "not-supported",
"interaction": [
{
"code": "read"
}
]
}
set PatientRes = {
"type": "Patient",
"versioning": "no-version",
"readHistory": false,
"updateCreate": false,
"conditionalCreate": false,
"conditionalRead": "not-supported",
"conditionalUpdate": false,
"conditionalDelete": "not-supported",
"interaction": [
{
"code": "read"
},
{
"code": "search-type"
}
],
"searchParam": [
{
"name": "gender",
"type": "token"
}
]
}
set metadata.rest."0".resource = [ (ObservationRes), (PatientRes) ]
return metadata
}
}