File tree 1 file changed +3
-2
lines changed
src/python-generator/second-try
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 100
100
(if-let [pattern (some #(when (= (name (first %)) (:name item)) (last %)) patterns)]
101
101
(case (:value item)
102
102
" str" (assoc item :value (:pattern pattern) :literal true )
103
- " CodeableConcept" (conj item (hash-map :value (str (str/join (map help/uppercase-first-letter (str/split (help/get-resource-name constraint-name) #"-" ))) (str/join (map help/uppercase-first-letter (str/split (:name item) #"-" ))) " = " ( str/join ( map help/uppercase-first-letter ( str/split ( help/get-resource-name constraint-name) #"-" ))) ( str/join ( map help/uppercase-first-letter ( str/split ( :name item) #"-" ))) " () " ) ))
103
+ " CodeableConcept" (conj item (hash-map :value (str (str/join (map help/uppercase-first-letter (str/split (help/get-resource-name constraint-name) #"-" ))) (str/join (map help/uppercase-first-letter (str/split (:name item) #"-" )))) :codeable-concept-pattern true ))
104
104
" Quantity" item item) item)) (:elements schema))
105
105
(hash-map :elements )
106
106
(conj schema)
138
138
((if (:array item) (fn [s] (str " List[" s " ]" )) str))
139
139
((if (:literal item) (fn [s] (str " Literal[\" " s " \" ] = " " \" " s " \" " )) str))
140
140
((if (and (not (:required item)) (not (:literal item))) (fn [s] (str " Optional[" s " ]" )) str))
141
- ((if (and (not (:required item)) (not (:literal item))) help/append-default-none str))
141
+ ((if (and (not (:required item)) (not (:literal item))) (fn [s] (str s " = None" )) str))
142
+ ((if (and (:required item) (:codeable-concept-pattern item)) (fn [s] (str s " = " (:value item) " ()" )) str))
142
143
; ; ((if (and (not (:required item)) (:array item)) help/append-default-vector str))
143
144
(str " \t " (:name item) " : " )
144
145
(str " \n " )))) elements)
You can’t perform that action at this time.
0 commit comments