Skip to content

Commit 45470e3

Browse files
authored
Fix last_modified query params for finding patients and visit notes (#58)
1 parent 1b1a786 commit 45470e3

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

patient.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ type FindPatientsOptions struct {
222222
MemberID int64 `url:"member_id,omitempty"`
223223
MasterPatient int64 `url:"master_patient,omitempty"`
224224
Practice int64 `url:"practice,omitempty"`
225-
LastModifiedGT time.Time `url:"last_modified_gt,omitempty"`
226-
LastModifiedGTE time.Time `url:"last_modified_gte,omitempty"`
227-
LastModifiedLT time.Time `url:"last_modified_lt,omitempty"`
228-
LastModifiedLTE time.Time `url:"last_modified_lte,omitempty"`
225+
LastModifiedGT time.Time `url:"last_modified__gt,omitempty"`
226+
LastModifiedGTE time.Time `url:"last_modified__gte,omitempty"`
227+
LastModifiedLT time.Time `url:"last_modified__lt,omitempty"`
228+
LastModifiedLTE time.Time `url:"last_modified__lte,omitempty"`
229229
}
230230

231231
func (s *PatientService) Find(ctx context.Context, opts *FindPatientsOptions) (*Response[[]*Patient], *http.Response, error) {

patient_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ func TestPatientService_Find(t *testing.T) {
148148
memberID := r.URL.Query().Get("member_id")
149149
masterPatient := r.URL.Query().Get("master_patient")
150150
practice := r.URL.Query().Get("practice")
151-
lastModifiedGT := r.URL.Query().Get("last_modified_gt")
152-
lastModifiedGTE := r.URL.Query().Get("last_modified_gte")
153-
lastModifiedLT := r.URL.Query().Get("last_modified_lt")
154-
lastModifiedLTE := r.URL.Query().Get("last_modified_lte")
151+
lastModifiedGT := r.URL.Query().Get("last_modified__gt")
152+
lastModifiedGTE := r.URL.Query().Get("last_modified__gte")
153+
lastModifiedLT := r.URL.Query().Get("last_modified__lt")
154+
lastModifiedLTE := r.URL.Query().Get("last_modified__lte")
155155

156156
limit := r.URL.Query().Get("limit")
157157
offset := r.URL.Query().Get("offset")

visit_note.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ type FindVisitNotesOptions struct {
187187
Physician int64 `url:"physician,omitempty"`
188188
Practice int64 `url:"practice,omitempty"`
189189

190-
LastModifiedGT time.Time `url:"last_modified_gt,omitempty"`
191-
LastModifiedGTE time.Time `url:"last_modified_gte,omitempty"`
192-
LastModifiedLT time.Time `url:"last_modified_lt,omitempty"`
193-
LastModifiedLTE time.Time `url:"last_modified_lte,omitempty"`
190+
LastModifiedGT time.Time `url:"last_modified__gt,omitempty"`
191+
LastModifiedGTE time.Time `url:"last_modified__gte,omitempty"`
192+
LastModifiedLT time.Time `url:"last_modified__lt,omitempty"`
193+
LastModifiedLTE time.Time `url:"last_modified__lte,omitempty"`
194194

195195
FromSignedDate time.Time `url:"from_signed_date,omitempty"`
196196
ToSignedDate time.Time `url:"to_signed_date,omitempty"`

visit_note_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,16 @@ func TestVisitNoteService_Find(t *testing.T) {
148148
actualPractice := r.URL.Query().Get("practice")
149149
assert.Equal(opts.Practice, strToInt64(actualPractice))
150150

151-
actualLastModifiedGT := r.URL.Query().Get("last_modified_gt")
151+
actualLastModifiedGT := r.URL.Query().Get("last_modified__gt")
152152
assert.Equal(opts.LastModifiedGT.Format(time.RFC3339), actualLastModifiedGT)
153153

154-
actualLastModifiedGTE := r.URL.Query().Get("last_modified_gte")
154+
actualLastModifiedGTE := r.URL.Query().Get("last_modified__gte")
155155
assert.Equal(opts.LastModifiedGTE.Format(time.RFC3339), actualLastModifiedGTE)
156156

157-
actualLastModifiedLT := r.URL.Query().Get("last_modified_lt")
157+
actualLastModifiedLT := r.URL.Query().Get("last_modified__lt")
158158
assert.Equal(opts.LastModifiedLT.Format(time.RFC3339), actualLastModifiedLT)
159159

160-
actualLastModifiedLTE := r.URL.Query().Get("last_modified_lte")
160+
actualLastModifiedLTE := r.URL.Query().Get("last_modified__lte")
161161
assert.Equal(opts.LastModifiedLTE.Format(time.RFC3339), actualLastModifiedLTE)
162162

163163
actualFromSignedDate := r.URL.Query().Get("from_signed_date")

0 commit comments

Comments
 (0)