-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding tests for questionnaire and few minor changes #2745
Changes from all commits
a569059
bad9099
9368366
8d33a6f
9c68f3c
db8fd5f
f5a8155
f1686c7
0a8f6ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.1.4 on 2025-01-21 11:15 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('emr', '0008_medicationrequest_medication'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='medicationrequest', | ||
name='authored_on', | ||
field=models.DateTimeField(blank=True, default=None, null=True), | ||
), | ||
] |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -80,7 +80,8 @@ def perform_extra_deserialization(self, is_update, obj): | |||||||
|
||||||||
class PatientListSpec(PatientBaseSpec): | ||||||||
date_of_birth: datetime.date | None = None | ||||||||
age: int | None = None | ||||||||
year_of_birth: datetime.date | None = None | ||||||||
|
||||||||
Comment on lines
+83
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type hint for year_of_birth seems... interesting. The Apply this diff to fix the type hint: - year_of_birth: datetime.date | None = None
+ year_of_birth: int | None = None 📝 Committable suggestion
Suggested change
|
||||||||
created_date: datetime.datetime | ||||||||
modified_date: datetime.datetime | ||||||||
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting choice of field definition...
The
authored_on
field in the spec (datetime
) doesn't quite match the model's permissiveness (null=True, blank=True, default=None
). This could lead to some... let's say, interesting validation scenarios. Perhaps we should align these?Consider updating the spec to match the model:
📝 Committable suggestion