nazrulworld / fhir.resources

FHIR Resources https://www.hl7.org/fhir/resourcelist.html
https://pypi.org/project/fhir.resources/
Other
373 stars 104 forks source link

DSTU2 - visionprescription #25

Closed iatechicken closed 3 years ago

iatechicken commented 3 years ago

I took a stab at the last one on the list, "visionprescription". I've tried to follow the previous commits as much as possible but since this is my first PR, I would strongly recommend that you double check my code please. Let me know where I got things wrong and what I missed please.

nazrulworld commented 3 years ago

@iatechicken thanks a lot, I will review your PR soon

iatechicken commented 3 years ago

@nazrulworld do we need enum_reference_types = ["Patient"] for all field types with ReferenceType? In careplan.py, I don't see enum_reference_types, but they were present in other files for field types with ReferenceType

https://github.com/nazrulworld/fhir.resources/blob/8a1f48a749d1d616a457cbfd7319258a7c4b3e94/fhir/resources/DSTU2/episodeofcare.py#L91

nazrulworld commented 3 years ago

@iatechicken please follow other files inside DSTU2/

I made some comments also, please have a look. 👍

iatechicken commented 3 years ago

@nazrulworld do we need enum_reference_types = ["Patient"] for all field types with ReferenceType? In careplan.py, I don't see enum_reference_types, but they were present in other files for field types with ReferenceType https://github.com/nazrulworld/fhir.resources/blob/8a1f48a749d1d616a457cbfd7319258a7c4b3e94/fhir/resources/DSTU2/episodeofcare.py#L91

Yes add that please

Added for all ReferenceType in visionprescription.py and supplyrequest.py. Just for clarification, do you want me to add the same enum_reference_types to all ReferenceType fields in careplan.py as well?

iatechicken commented 3 years ago

I think we're close. few questions left, but since we were going back and forth over the same file multiple times, I went ahead and got started on supplyrequest.py with all the info gained so far. Would it be possible to get a review on a new file first for fresh perspective and to make sure that I've been following everything so far please?

I will also go through visionprescription.py from top to bottom one more time after the questions and review. (Please don't merge this until everything looks ok and I've said that "I've reviewed visionprescription.py in full again")