• Hi!

    I need to map taxonomies to posts. Post needs to be able to have same taxonomy multiple times.

    Basically I have patients (CPT), appointments (CPT) and services (custom taxonomy). Each service has a price. One patient can have multiple appointments, and one appointment can have the same service multiple times.

    What would be the best way to solve this?
    I already created a relation between appointments and patients using Pods plugin, but it does not provide a way to assign the same CPT multiple times.

    I am not afraid of writing plain PHP, but I would prefer a friendly plugin to achieve my goal. Do you have any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • > I need to map taxonomies to posts
    > What would be the best way to solve this?

    Apart from the tech issue, what is the business rule or problem you are trying to accomplish?
    Say you are able to do what you want to do – what or how is supposed to be used?

    Thread Starter s0what

    (@s0what)

    Thank you for the reply corrinarusso!

    I am building a CRM system for an animal hospital where doctors can register their patients, set appointments in calendar and assign certain procedures (services) to the appointments.

    Each service has a price. For example, injection costs 5 euro, there can be 3 injections during an appointment.

    • This reply was modified 3 years, 10 months ago by s0what.

    > I am building a CRM system

    Custom made ?

    > Each service has a price

    If each service has a price, shouldn’t you be attaching the value to a product, and not a tag ?

    There are certainly existing themes and plugins that can accommodate 90% of the business for an animal clinic. Is this not an option, or are there also existing integration points to software or applications within the clinic?

    Thread Starter s0what

    (@s0what)

    In my case I am using Taxonomy as a product, because then I can easily see, for example, which patients received the injection in last few months.

    I can also create a CPT for the product, but that does not help me with assigning it multiple times.

    I believe there are existing CRM plugins or themes, but so far I have not been able to find anything that I could use.

    More or less, this is the only problem I have faced so far.
    I still need to build a calendar where all the appointments will be displayed and the system is almost ready.

    Well tbh it sounds old school to re-invent the wheel, but it’s a fun project for you! ??
    So I understand that.

    I’m not convinced I can provide any smart input for you. It is sort of difficult to visualize tbh. Did you try Advanced Custom Fields instead of PODs ?

    Moderator bcworkz

    (@bcworkz)

    Maybe you need a taxonomy term for each type of injection? Parvo, Heartworm, Distemper, etc.? A patient wouldn’t have multiple vaccinations of one type in one appointment, would it?

    In my mind, these aren’t properly taxonomy terms as they are not used to organize posts of whatever type, are they? These strike me as better being yet another post type which could be related to appointments the same way patients are. I still don’t think you would be able to relate the same post multiple times unless each injection type were its own post.

    > these aren’t properly taxonomy terms as they are not used to organize posts of whatever type

    Agree.
    I think there needs to be a different approach.
    Personally I would use a Products module.
    https://www.ads-software.com/plugins/ecommerce-product-catalog/

    我在做一些复杂的产品结构时,经常会用到ACF中的几个字段类型,在配合wordpress的数据库查询方法,可以轻松搞定大部分复杂的业务逻辑交互

    希望对你有帮助,

    https://www.advancedcustomfields.com/resources/post-object/

    https://www.advancedcustomfields.com/resources/relationship/

    https://www.advancedcustomfields.com/resources/repeater/

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Assign same taxonomy multiple times’ is closed to new replies.