thank you very much for helping me.  can you help me how to map these 
values in the output.clj file

On Friday, September 28, 2018 at 12:14:50 AM UTC+5:30, Robert P. Levy wrote:
>
> No need for macro
>
> (let [example-data [['hospice-enc "hospice enc" "HOSPICE_ENC"]
>                     ['hospice-env "hospice env" "HOSPICE_ENV"]]]
>   (doseq [[name-sym desc-string name-string] example-data]
>     (spit "/tmp/clinic.clj"
>           (format "%s\n"
>                   (pr-str `(onto/defconcept ~name-sym ~desc-string 
> ~name-string)))
>           :append true)))
>
> Generates this in /tmp/clinic.clj
>
> (onto/defconcept hospice-enc "hospice enc" "HOSPICE_ENC")
> (onto/defconcept hospice-env "hospice env" "HOSPICE_ENV")
>
>
>
> On Thu, Sep 27, 2018 at 11:43 AM venkata sai <venky...@gmail.com 
> <javascript:>> wrote:
>
>> Yes thank you I will try with this approach..but how do I take parameters 
>> in macros
>>
>> On 28 Sep 2018 00:06, "Robert Levy" <r.p....@gmail.com <javascript:>> 
>> wrote:
>>
>>> Actually, if you are trying to write out to a file, then instead do this
>>>
>>> (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)]
>>>   (spit "clinic.clj"
>>>         (pr-str `(onto/defconcept ~name-sym ~desc-string ~name-string))
>>>         :append true))
>>>
>>>
>>> On Thu, Sep 27, 2018 at 11:30 AM Robert Levy <r.p....@gmail.com 
>>> <javascript:>> wrote:
>>>
>>>> I think that if you're wanting to do this then you probably are taking 
>>>> the wrong approach, but taking you at face value I would say try 
>>>> something like this.  If you provide more information on what you are 
>>>> actually trying to do, then you might be able to get better advice.
>>>>
>>>> (defmacro def-onto-concept [name-sym desc-str name-str]
>>>>   `(onto/defconcept ~name-sym ~desc-str ~name-str))
>>>>
>>>> (doseq [[name-sym desc-string name-string] (prepare-data spreadsheet)]
>>>>   (def-onto-concept name-sym desc-string name-string))
>>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com 
>>> <javascript:>
>>> Note that posts from new members are moderated - please be patient with 
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com <javascript:>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> <javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Concept
HOSPICE_ENC
HOSPICE_ENV
HOSPICE_FACILITY_ENV
ACUTE_INPATIENT_ENC
ACUTE_INPATIENT_ENV
HIGH_RISK_CONDITION_CLIN
OUTPATIENT_ENV
OUTPATIENT_ENC
SSI_SURGICAL_PROCEDURE_PROC
SSI_SURGICAL_SITE_INFECTION_CLIN
PROPHYLACTIC_ANTIMICROBIAL_PROC
ORDER_FOR_ANTIMICROBIAL_PROPHYLAXIS_PROC
ORDER_FOR_ANTIMICROBIAL_PROPHYLAXIS_PROC
MEDICAL_REASON_PROPHYLACTIC_ANTIMICROBIAL_NOT_ORDERED_PROC
VTE_PROC
VTE_PROPHYLAXIS_ORDERED_OR_GIVEN_PROC
VTE_PROPHYLAXIS_ORDERED_OR_GIVEN_PROC
CVC_PROC
MAXIMAL_STERILE_BARRIER_TECHNIQUE_PROC
MAXIMAL_STERILE_BARRIER_TECHNIQUE_PROC
MSSA_INPATIENT_ENC
SEPSIS_DUE_TO_MSSA_CLIN
SEPSIS_DUE_TO_MSSA_CLIN
BETA_LACTAM_ANTIBIOTIC_NOT_PRESCRIBED_MEDICAL_REASON_PROC
ISCHEMIC_STROKE_CLIN
INPATIENT_STAY_ENV
COMFORT_CARE_PROC
CLINICAL_TRIAL_PARTICIPANT_CLIN
CAROTID_INTERVENTION_PROC
LEFT_AMA_DCDIS
ACUTE_INPATIENT_ENC
NONACUTE_INPATIENT_ENC
ANTIPLATELET_THERAPY_MED
ANTICOAGULANT_MED
MEDICAL_REASON_CLIN
CARDIAC_STRESS_IMAGING_PROC
CARDIAC_STRESS_IMAGING_LOW_RISK_SURGERY_PATIENT_PROC
ED_ENC
ED_ENV
MINOR_BLUNT_HEAD_TRAUMA_CLIN
GLASGOW_COMA_SCORE_OBSTYPE
ADULT_HEAD_CT_FOR_TRAUMA_PROC
CT_LESS_THAN_24_HOURS_AFTER_MINOR_HEAD_TRAUMA_ADULT_PROC
MINOR_BLUNT_HEAD_TRAUMA_EXCLUSION_INDICATIONS_ADULT_CLIN
Null
SEVERE_HEADACHE_CLIN
VOMITING_CLIN
PHYSICAL_FINDINGS_OF_A_BASILAR_SKULL_FRACTURE_CLIN
FOCAL_NEUROLOGICAL_DEFICIT_CLIN
COAGULOPATHY_CLIN
THROMBOCYTOPENIA_CLIN
DANGEROUS_MECHANISM_OF_INJURY_CLIN
ANTICOAGULANT_MED
LOSS_OF_CONSCIOUSNESS_CLIN
POST_TRAUMATIC_AMNESIA_CLIN
DRUG_ALCOHOL_INTOXICATION_CLIN
HEADACHE_CLIN
SHORT_TERM_MEMORY_LOSS_CLIN
HEAD_OR_NECK_TRAUMA_CLIN
POST_TRAUMATIC_SEIZURE_CLIN
PEDS_HEAD_CT_FOR_TRAUMA_PROC
CT_LESS_THAN_24_HOURS_AFTER_MINOR_HEAD_TRAUMA_PEDS_PROC
MINOR_BLUNT_HEAD_TRAUMA_EXCLUSION_INDICATIONS_PEDS_CLIN
ALTERED_MENTAL_STATUS_CLIN
PHYSICAL_FINDINGS_OF_A_BASILAR_SKULL_FRACTURE_CLIN
LOSS_OF_CONSCIOUSNESS_CLIN
VOMITING_CLIN
DANGEROUS_MECHANISM_OF_INJURY_CLINY
SEVERE_HEADACHE_CLIN
SURGICAL_PROCEDURE_PROC
UNPLANNED_SURGICAL_PROCEDURE_PROC
OPIOID_MED
CANCER_CLIN
BENZODIAZEPINE_MED

Attachment: output1.clj
Description: Binary data

Reply via email to