Giter Club home page Giter Club logo

Comments (9)

abhishek-jain-1999 avatar abhishek-jain-1999 commented on June 7, 2024 1

@Rohan-cod okay now I understand why there were such changes but don't you think it is useless to have a temp variable made in memory not only just to give it away it next line but also to keep in memory until it is dumped

in short double memory usage will be there and unnecessary time will be used as it is been done at multiple places
and also as code reader it is confusing to see a variable been made and not been use later

like for example

        if 'code' in j['valueCodeableConcept']['coding'][0]\
                            .keys(
        ):
                 t = j['valueCodeableConcept']['coding'][0]["code"]
                 od_componentvalue_codeable_concept["code"] = t

this looks much simpler to understand

                        if 'code' in j['valueCodeableConcept']['coding'][0].keys():
                            od_componentvalue_codeable_concept["code"] = j['valueCodeableConcept']['coding'][0]["code"]

from vcf2fhir.

Rohan-cod avatar Rohan-cod commented on June 7, 2024 1

You are absolutely correct @abhishek-jain-1999. If you have any other way to conform to the rule of having no more than 79 characters in a single line you can do that, but using od_componentvalue_codeable_concept["code"] = j['valueCodeableConcept']['coding'][0]["code"] will cause the checks to fail.

from vcf2fhir.

abhishek-jain-1999 avatar abhishek-jain-1999 commented on June 7, 2024 1

@Rohan-cod Thanks for your response . Let me see if I am able to find another way to handle this issue

from vcf2fhir.

abhishek-jain-1999 avatar abhishek-jain-1999 commented on June 7, 2024

@rhdolin @srgothi92 please tell me if this cannot be considered as an issue or if there something relate to this code that I am not aware of

from vcf2fhir.

Rohan-cod avatar Rohan-cod commented on June 7, 2024

@abhishek-jain-1999, the code was od_componentvalue_codeable_concept["system"] = j['valueCodeableConcept']['coding'][0]["system"] before and I changed it to
temp = j['valueCodeableConcept']['coding'][0]["system"]
od_componentvalue_codeable_concept["system"] = temp
because according to PEP 8 we can only have 79 characters in a line.

from vcf2fhir.

Rohan-cod avatar Rohan-cod commented on June 7, 2024

No Problem @abhishek-jain-1999 😀. All the best 👍

from vcf2fhir.

Rohan-cod avatar Rohan-cod commented on June 7, 2024

@abhishek-jain-1999, I figured out a way to do this. I missed it while I was changing the code 😅.
Changing the code from 👇

         if 'code' in j['valueCodeableConcept']['coding'][0]\
             .keys(
         ):
             t = j['valueCodeableConcept']['coding'][0]["code"]
             od_componentvalue_codeable_concept["code"] = t

to 👇

         if 'code' in j['valueCodeableConcept']['coding'][0]\
             .keys(
         ):
             od_componentvalue_codeable_concept["code"] =\
                 j['valueCodeableConcept']['coding'][0]["code"]

and doing the same at other locations will help you remove most of the temporary variables.
Just an option. Completely up to you, if you want you can use my approach.

from vcf2fhir.

srgothi92 avatar srgothi92 commented on June 7, 2024

Nice work everyone, I really like the conversation that is happening in each issues and PR.

Contributors Cheers 🍷

from vcf2fhir.

Rohan-cod avatar Rohan-cod commented on June 7, 2024

Nice work everyone, I really like the conversation that is happening in each issues and PR.

Contributors Cheers 🍷

Cheers @srgothi92 😄

from vcf2fhir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.