sync encounter
This commit is contained in:
No files matched your search
@@ -49,6 +49,24 @@ func UpdateStatus(input *e.Encounter) error {
|
||||
return helper.DoJsonRequest(input, "PATCH", endpoint)
|
||||
}
|
||||
|
||||
func RequestSwitchUnit(input *e.Encounter) error {
|
||||
prefixEndpoint := getPrefixEndpoint()
|
||||
endpoint := fmt.Sprintf("%s/%v/req-switch-unit", prefixEndpoint, input.Id)
|
||||
return helper.DoJsonRequest(input, "PATCH", endpoint)
|
||||
}
|
||||
|
||||
func ApproveSwitchUnit(input *e.ApproveCancelUnitDto) error {
|
||||
prefixEndpoint := getPrefixEndpoint()
|
||||
endpoint := fmt.Sprintf("%s/%v/approve-switch-unit", prefixEndpoint, input.Id)
|
||||
return helper.DoJsonRequest(input, "PATCH", endpoint)
|
||||
}
|
||||
|
||||
func CancelSwitchUnit(input *e.ApproveCancelUnitDto) error {
|
||||
prefixEndpoint := getPrefixEndpoint()
|
||||
endpoint := fmt.Sprintf("%s/%v/cancel-switch-unit", prefixEndpoint, input.Id)
|
||||
return helper.DoJsonRequest(input, "PATCH", endpoint)
|
||||
}
|
||||
|
||||
func getPrefixEndpoint() string {
|
||||
return fmt.Sprintf("%s%s/v1/encounter", sync.O.Host, sync.O.Prefix)
|
||||
}
|
||||
Reference in New Issue
Block a user