|
295 | 295 | constraint-schemas)))))
|
296 | 296 |
|
297 | 297 | (defn generate-constraint-module [schema]
|
298 |
| - (let [backbone-elements-classes (->> (:backbone-elements schema) |
299 |
| - (map #(assoc % :base "BackboneElement")) |
300 |
| - (mapv generate-class)) |
301 |
| - resource-class (generate-class schema backbone-elements-classes)] |
302 |
| - (generate-module |
303 |
| - :name (package->module-name (:package schema)) |
304 |
| - :deps [{:module "Aidbox.FHIR.Base" :members []} |
305 |
| - {:module "Aidbox.FHIR.Utils" :members []}] |
306 |
| - :classes resource-class))) |
| 298 | + (generate-module |
| 299 | + :name (package->module-name (:package schema)) |
| 300 | + :deps [{:module "Aidbox.FHIR.Base" :members []} |
| 301 | + {:module "Aidbox.FHIR.Utils" :members []}] |
| 302 | + :classes (generate-class schema (map generate-class schema)))) |
307 | 303 |
|
308 | 304 | ;;
|
309 | 305 | ;; main
|
310 | 306 | ;;
|
311 | 307 |
|
312 |
| -(defn generate-backbone-classes [ir-schema] |
313 |
| - (->> (ir-schema :backbone-elements) |
314 |
| - (map #(assoc % :base "BackboneElement")) |
315 |
| - (map generate-class))) |
316 |
| - |
317 | 308 | (defn datatypes-file-path []
|
318 | 309 | (io/file "Base.cs"))
|
319 | 310 |
|
|
333 | 324 | :name "Aidbox.FHIR.Base"
|
334 | 325 | :classes (map (fn [ir-schema]
|
335 | 326 | (generate-class ir-schema
|
336 |
| - (generate-backbone-classes ir-schema))) |
| 327 | + (map generate-class (:backbone-elements ir-schema)))) |
337 | 328 | ir-schemas))}])
|
338 | 329 |
|
339 | 330 | (generate-resource-module [_ ir-schema]
|
|
343 | 334 | :deps [{:module "Aidbox.FHIR.Base" :members []}
|
344 | 335 | {:module "Aidbox.FHIR.Utils" :members []}]
|
345 | 336 | :classes [(generate-class ir-schema
|
346 |
| - (generate-backbone-classes ir-schema))])}) |
| 337 | + (map generate-class (:backbone-elements ir-schema)))])}) |
347 | 338 |
|
348 | 339 | (generate-search-params [_ ir-schemas]
|
349 | 340 | (map (fn [ir-schema]
|
|
0 commit comments